Re: oids - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: oids
Date
Msg-id Pine.LNX.4.44.0309022005150.1038-100000@peter.localdomain
Whole thread Raw
In response to oids  (Mark <mark@vestnesis.lv>)
List 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@gmx.net


pgsql-admin by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Prompts in psql
Next
From: "3rd."
Date:
Subject: YOUR SITES SEARCH FEATURE DOES NOT WORK!