SELECT attname AS name, attrelid AS tid,coalesce((SELECT attnum = ANY (conkey) FROM pg_constraint WHERE contype = 'p' AND conrelid = attrelid), false) AS primarykey,not(attnotnull) AS allownull,(SELECT seq.oid FROM pg_class seq LEFT JOIN pg_depend dep ON seq.oid = dep.objid WHERE seq.relkind = 'S'::char AND dep.refobjsubid = attnum AND dep.refobjid = attrelid) IS NOT NULL AS autoincrement FROM pg_attribute WHERE attisdropped = false AND attrelid = (SELECT tbl.oid FROM pg_class tbl LEFT JOIN pg_namespace sch ON tbl.relnamespace = sch.oid WHERE tbl.relkind = 'r'::"char" AND tbl.relname = 'pntdeathsvid' AND sch.nspname = 'dbo') AND (attname = 'server_id' OR attname = 'pntdeathsvid_id' OR attname = 'person_id' OR attname = 'lpu_id' OR attname = 'lpusection_id' OR attname = 'pntdeathsvid_ser' OR attname = 'pntdeathsvid_num' OR attname = 'pntdeathperiod_id' OR attname = 'deathsvidtype_id' OR attname = 'pntdeathsvid_oldser' OR attname = 'pntdeathsvid_oldnum' OR attname = 'medpersonal_id' OR attname = 'pntdeathsvid_deathdate' OR attname = 'address_did' OR attname = 'person_rid' OR attname = 'recepttype_id' OR attname = 'pntdeathsvid_childfio' OR attname = 'pntdeathsvid_childbirthdt' OR attname = 'pntdeathsvid_plodindex' OR attname = 'pntdeathsvid_plodcount' OR attname = 'pntdeathsvid_rcpdoc' OR attname = 'pntdeathsvid_rcpdate' OR attname = 'pntdeathfamilystatus_id' OR attname = 'deathemployment_id' OR attname = 'pntdeathplace_id' OR attname = 'nation_id' OR attname = 'nationother_id' OR attname = 'pntdeatheducation_id' OR attname = 'sex_id' OR attname = 'pntdeathsvid_childcount' OR attname = 'pntdeathsvid_birthcount' OR attname = 'pntdeathsvid_pregncount' OR attname = 'pntdeathgetbirth_id' OR attname = 'pntdeathtime_id' OR attname = 'pntdeathcause_id' OR attname = 'pntdeathsettype_id' OR attname = 'pntdeathsetcause_id' OR attname = 'diag_iid' OR attname = 'diag_eid' OR attname = 'diag_mid' OR attname = 'diag_tid' OR attname = 'diag_oid' OR attname = 'pntdeathsvid_mass' OR attname = 'pntdeathsvid_height' OR attname = 'pntdeathsvid_ismnogoplod' OR attname = 'pntdeathsvid_givedate' OR attname = 'pntdeathsvid_oldgivedate' OR attname = 'pmuser_insid' OR attname = 'pmuser_updid' OR attname = 'pntdeathsvid_insdt' OR attname = 'pntdeathsvid_upddt' OR attname = 'pntdeathsvid_isbad' OR attname = 'familystatus_id' OR attname = 'pntdeathsvid_issigned' OR attname = 'pmuser_signid' OR attname = 'pntdeathsvid_signdt' OR attname = 'deputykind_id' OR attname = 'pntdeathsvid_ismarried' OR attname = 'org_id' OR attname = 'pntdeathsvid_zagsfio' OR attname = 'pntdeathsvid_actnumber' OR attname = 'pntdeathsvid_actdt' OR attname = 'pntdeathsvid_isfrommother' OR attname = 'orghead_id' OR attname = 'pntdeathsvidtype_id' OR attname = 'orgheadpost_id' OR attname = 'person_hid' OR attname = 'pntdeathsvid_isduplicate' OR attname = 'pntdeathsvid_islose' OR attname = 'pntdeathsvid_birthdatestr' OR attname = 'pntdeathsvid_deathdatestr' OR attname = 'pntdeathsvid_labordatestr' OR attname = 'medstafffact_id' OR attname = 'pntdeathsvid_polfio' OR attname = 'pntdeathsvid_traumadatestr' OR attname = 'pntdeathsvid_isactual' OR attname = 'pntdeathsvid_isnoplace' OR attname = 'pntdeathsvid_isbirthdate' OR attname = 'pntdeathsvid_isnodeathtime' OR attname = 'pntdeathsvid_isnoaccidenttime' OR attname = 'person_cid' OR attname = 'medstafffact_did' OR attname = 'pntdeathsvid_deleted' OR attname = 'pntdeathsvid_deldt' OR attname = 'pmuser_delid' OR attname = 'pntdeathsvid_rowversion' OR attname = 'medstafffact_hid' OR attname = 'pntdeathsvid_isnoemployment' OR attname = 'pntdeathsvid_isnobirthcount' OR attname = 'pntdeathsvid_isnochildcount' OR attname = 'lpubuilding_id' OR attname = 'pntdeathsvid_ispolmanual' OR attname = 'deathsvidpol_id' OR attname = 'medpersonal_cid' OR attname = 'medstafffact_cid' OR attname = 'pntdeathsvid_checkdate' OR attname = 'pntdeathemployment_id' OR attname = 'deathsvidformpol_id' OR attname = 'pntdeathsvid_isconsentemd' OR attname = 'pntdeathsvid_consentemddt' OR attname = 'mkbdeathsvid_iid' OR attname = 'mkbdeathsvid_tid' OR attname = 'mkbdeathsvid_mid' OR attname = 'mkbdeathsvid_eid' OR attname = 'mkbdeathsvid_oid' OR attname = 'mkbdeathsviddrug_oid' OR attname = 'medstafffact_bid' OR attname = 'lpu_bid' OR attname = 'relatedtype_id' OR attname = 'pntdeathsvid_prefix')
