Re: [HACKERS] Serial Data Type
От | darcy@druid.net (D'Arcy J.M. Cain) |
---|---|
Тема | Re: [HACKERS] Serial Data Type |
Дата | |
Msg-id | m0zIMpH-00006FC@druid.net обсуждение исходный текст |
Ответ на | Re: [HACKERS] Serial Data Type (David Hartwig <daybee@bellatlantic.net>) |
Список | pgsql-hackers |
Thus spake David Hartwig > > As for finding the primary, with the new changes we should be able > > to do something like this. > > > > SELECT pg_class.relname, pg_attribute.attname > > FROM pg_class, pg_attribute, pg_index > > WHERE pg_class.oid = pg_attribute.attrelid AND > > pg_class.oid = pg_index.indrelid AND > > pg_index.indkey[0] = pg_attribute.attnum AND > > pg_index.indisprimary = 't'; > > > > Is pg_index.indisprimary available now to determine primary'ness. If not, > when? It is now in the current tree but it isn't used yet. I just manually set it for the tables I need and then use it. Eventually I will be able to leave out the manual step and all my code will work. Right now it is always set to 'f' at create time. -- D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.
В списке pgsql-hackers по дате отправления: