МШ
mshurutov@homebuh > \d dochead
Таблица "public.dochead"
Столбец | Тип | Правило сортировки | Допустимость NULL | По умолчанию
-------------+-----------------------------+--------------------+-------------------+----------------------------------------
dh_id | bigint | | not null | nextval('dochead_dh_id_seq'::regclass)
createts | timestamp without time zone | | | now()
createyear | character(4) | | | date_part('year'::text, now())
updatets | timestamp without time zone | | | now()
distributor | uuid | | |
customer | uuid | | |
tradeamount | money | | |
discount | money | | | 0
Индексы:
"dochead_dh_id" PRIMARY KEY, btree (dh_id)
Ограничения внешнего ключа:
"dochead_customer_fk" FOREIGN KEY (customer) REFERENCES partners(partners_uuid)
"dochead_distributor_fk" FOREIGN KEY (distributor) REFERENCES partners(partners_uuid)
Ссылки извне:
TABLE "docbody" CONSTRAINT "docbody_dh_id_fk" FOREIGN KEY (dh_id) REFERENCES dochead(dh_id)
mshurutov@homebuh >
Ссылки извне, однако, в листинге.