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.