From: btober@seaworthysys.com
To: middink@indo.net.id
Cc: pgsql-sql@postgresql.org
Subject: Re: auto_increment
Date: Sat, 20 Sep 2003 03:45:23 -0400 (EDT)
Message-ID: <65456.66.212.203.144.1064043923.squirrel@$HOSTNAME> (raw)
In-Reply-To: <008501c37f35$832e26e0$1f00a8c0@middinkcomp>
References: <008501c37f35$832e26e0$1f00a8c0@middinkcomp>
> How to Create auto_increment field in PostreSQL.
Its called the SERIAL datatype:
create table test_table (
field1 serial,
constraint test_table_pkey primary key (field1));
> Can I create them using Trigger.
Yes, alternatively, but I'm told that is not recommended because the
server source code that manages the special sequence table is highly
optimized for this specific functionality.
~Berend Tober
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: btober@seaworthysys.com, middink@indo.net.id
Subject: Re: auto_increment
In-Reply-To: <65456.66.212.203.144.1064043923.squirrel@$HOSTNAME>
* 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