Обсуждение: pgadmin3 doesn't list oid in columns

Поиск
Список
Период
Сортировка

pgadmin3 doesn't list oid in columns

От
dima Q
Дата:
Pgadmin3 doesn't seem to think of oid as a column in a table created
"with oids".

The consequences of this are:
oid cannot be used when making constraints PK, FK, UNIQUE, etc in
table modification dialog
oid cannot be used when creating constraints in the constraint dialog
oid cannot be used when making indices with pgadmin3

I created oid-related constraints, indices etc. by hand and they can
be viewed by pgadmin3 though.

Is this a misfeature or you disabled such functionality on purpose
because it can be seen as "bad style" in postresql?


Re: pgadmin3 doesn't list oid in columns

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of dima Q
> Sent: 15 November 2004 19:41
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] pgadmin3 doesn't list oid in columns
>
> Pgadmin3 doesn't seem to think of oid as a column in a table
> created "with oids".
>
> The consequences of this are:
> oid cannot be used when making constraints PK, FK, UNIQUE,
> etc in table modification dialog oid cannot be used when
> creating constraints in the constraint dialog oid cannot be
> used when making indices with pgadmin3
>
> I created oid-related constraints, indices etc. by hand and
> they can be viewed by pgadmin3 though.
>
> Is this a misfeature or you disabled such functionality on
> purpose because it can be seen as "bad style" in postresql?

Hi,

The oid column is classed as a system column, and as such is only
visible with 'View System Objects' turned on. You should not use this
column in your databases unless you have a very specific reason - one
very good reason not to use them is that OIDs are not necessarily
included in database dumps, therefore referential integrity might be
broken if you restore such a dump and had used the OID column in foreign
keys. There are also potential problems with OID-wraparound on large
databases.

Instead, I would suggest using a serial column as your PK etc. in all
your tables.

Regards, Dave