pg_class not updated correctly?
От | Darrin Ladd |
---|---|
Тема | pg_class not updated correctly? |
Дата | |
Msg-id | F259m9OciPXkmCJiLyN00000e16@hotmail.com обсуждение исходный текст |
Ответы |
Re: pg_class not updated correctly?
|
Список | pgsql-general |
Howdy, I am creating my first *real* tables in Postgres and noticed something that concerned me. It appears that the pg_class table is not being updated correctly to reflect the constraints on the table. Here is my example... I created a table code: CREATE TABLE code ( code_type_no int, code_no int, code_desc varchar, CONSTRAINT pk_code PRIMARY KEY (code_type_no, code_no), CONSTRAINT fk_code_codetype_code_type_no FOREIGN KEY (code_type_no) REFERENCES code_type (code_type_no) ); As you can see it has a primary key and a foreign key. But when looking at the pg_class table: pg_class.relname = code reltriggers = 2 yes relukeys = 0 maybe as long as primary shouldn't be displayed here as unique relfkeys = 0 NO! relhaspkey = f NO! This is not the only table that I have created, all of them have at least a primary key, and none of them are showing a number > 0 for ukeys or anything but an f for haspkey. Am I reading this table incorrectly, or is there something wrong with the way Postgres is updating this table? Thanks! Darrin ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
В списке pgsql-general по дате отправления: