On Tue, May 20, 2003 at 11:04:02AM +0200, javier garcia - CEBAS wrote:
> Hi;
> I'm pretty new in Postgres.
> I've created several tables but I didn't care about PRIMARY KEYS in the
> begining. Now I woul like to add them to the tables.
> I've read that PostgreSQL adds an automatic column called OID to each table;
> but when I do a SELECT, the OID column doesn't not appear.
The OID is hidden from view. You have to ask from it explicitly.
> Is this OID column a PRIMARY KEY by default? Can I see it?
No, the oid field is not guarenteed to be unique.
> How can I see what column is the primary key in a table?
\d table mentions it iirc
> Can I select, at any moment a different Prymary Key?
A primary is just a unique identifier. So any field with a unique index can
be a primary key.
> Can I alter the values of a Prymary Key in a Table?
Yes.
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> "the West won the world not by the superiority of its ideas or values or
> religion but rather by its superiority in applying organized violence.
> Westerners often forget this fact, non-Westerners never do."
> - Samuel P. Huntington