Re: [HACKERS] Serial Data Type - Mailing list pgsql-hackers

From darcy@druid.net (D'Arcy J.M. Cain)
Subject Re: [HACKERS] Serial Data Type
Date
Msg-id m0zIMpH-00006FC@druid.net
Whole thread Raw
In response to Re: [HACKERS] Serial Data Type  (David Hartwig <daybee@bellatlantic.net>)
List 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 by date:

Previous
From: Jon Buller
Date:
Subject: Compiling 6.4 on NetBSD-current/pc532
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] AbortTransaction and not in in-progress state