pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gerhard Dieringer <DieringG@eba-haus.de>
To: daniel@clacknet.com
To: pgsql-sql@postgresql.org
Subject: Antw: Automatic index numbers
Date: Thu, 18 May 2000 08:52:32 +0200
Message-ID: <s923af60.091@kopo001> (raw)


>>> daniel@clacknet.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





Message-ID: <s923af60.091@kopo001>
Permalink:  ../s923af60.091@kopo001/
Also on:    postgresql.org/message-id/s923af60.091@kopo001

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: DieringG@eba-haus.de, daniel@clacknet.com
  Subject: Re: Automatic index numbers
  In-Reply-To: <s923af60.091@kopo001>
  References: <s923af60.091@kopo001>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox