unique ID across all columns

From: Felix Kater <fkater(at)googlemail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: unique ID across all columns
Date: 2007-04-17 12:48:26
Message-ID: 20070417144826.c27c9794.fkater@googlemail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I need a unique ID across all columns I create. Is it o.k. to
achive this by combining pg_attribute.attnum of a column together with
the OID of the table the column is in?

While the table's OID should be unique according to the manual, I have
found no hints about the uniqueness of attnum -- I removed and added
some columns and it seems that already used values are not used again.

Felix

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-04-17 13:07:04 Re: Implementing Frontend/Backend Protocol
Previous Message Ketema 2007-04-17 11:35:46 Re: Dynamic DDL