Antw: Automatic index numbers

From: "Gerhard Dieringer" <DieringG(at)eba-haus(dot)de>
To: <daniel(at)clacknet(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Antw: Automatic index numbers
Date: 2000-05-18 06:52:32
Message-ID: s923af60.091@kopo001
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


>>> daniel(at)clacknet(dot)com 18.05.2000 02.52 Uhr >>>
>
> How can I automatically create a unique index
> number when I add new data to a table?
>
> Does this have to be done through a high level
> language or does the database provide a function
> for this?
>
> -Daniel

You can use a column with datatype serial or an integer with default nextval('a_sequence')

Gerhard

Browse pgsql-sql by date

  From Date Subject
Next Message christine 2000-05-18 09:21:01 Translaye from Oracle
Previous Message Tom Lane 2000-05-18 03:18:54 Re: pg_dump return failed sanity check