Re: oids

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Mark <mark(at)vestnesis(dot)lv>
Cc: PostgreSQL Administrators Mailing List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: oids
Date: 2003-09-02 18:07:24
Message-ID: Pine.LNX.4.44.0309022005150.1038-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Mark writes:

> Is there other meanings of oids than unique row identifier?

In normal user tables, OIDs don't mean anything unless you interpret
something into them. Nowadays, the advice is usually not to use OIDs, but
instead use user-defined sequences.

> Can I make two identical tables in the same database (even with oids)?

Yes.

> Something like this
> CREATE TABLE table2 AS (SELECT oid,* FROM table1);

This won't work (aside from the syntax error caused by the extra
parentheses), because CREATE TABLE will automatically add an oid column in
table2, which will interfere with the one from table1.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

  • oids at 2003-09-02 10:28:02 from Mark

Browse pgsql-admin by date

  From Date Subject
Next Message Manuel Haroldo 2003-09-02 19:24:48 Question
Previous Message Peter Eisentraut 2003-09-02 17:57:48 Re: Prompts in psql