From: | David Hartwig <daybee(at)bellatlantic(dot)net> |
---|---|
To: | "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net> |
Cc: | David Hartwig <daveh(at)insightdist(dot)com>, pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] Serial Data Type |
Date: | 1998-09-13 14:18:54 |
Message-ID: | 35FBD44E.5EA9F097@bellatlantic.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
D'Arcy J.M. Cain wrote:
> > 2. Can a declared serial column be also a primary key? If so, what
> > will be the side effected? Specifically, how will the unique index be
> > named? The ODBC driver uses the {relname}_pkey to identify the primary
> > key of a table. The driver must be able to identify primary keys.
>
> I suspect that the serial field will be the primary key 99% of the time.
> I hope it can be.
>
> 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?
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas G. Lockhart | 1998-09-13 14:27:12 | Re: [HACKERS] AbortTransaction and not in in-progress state |
Previous Message | Thomas G. Lockhart | 1998-09-13 05:07:06 | libpq++ shared library missing? |