Is there an auto incrementing number field?

Started by Robert Chalmersalmost 27 years ago4 messagesgeneral
Jump to latest
#1Robert Chalmers
robert@chalmers.com.au

I'm looking through the 6.5 specs, and wondering if there is an
Auto-Incrementing field in this release?

of if not, is there a way of achieving this end? So that as I add a new
record to a table, it's '#ID' for example is automatically added. 1, 2, 3,
4,... and so on

thanks
Bob

---  http://4qir.quantum-radio.net.au - Where Only The Dedicated Survive!
4QIR Quantum Radio. Bringing you the original sounds of AFVN, with some of
the
original DJ's - back on air - and supporting not only the original Vets, in
comprehensive AFVN Archives, but putting together segments for the fighting
men and
women of todays services all around the world. World Music, for people of
the world.
#2Dustin Sallings
dustin@spy.net
In reply to: Robert Chalmers (#1)
Re: [GENERAL] Is there an auto incrementing number field?

On Thu, 24 Jun 1999, Robert Chalmers wrote:

There has been for a while, it's called serial.

// I'm looking through the 6.5 specs, and wondering if there is an
// Auto-Incrementing field in this release?
//
// of if not, is there a way of achieving this end? So that as I add a new
// record to a table, it's '#ID' for example is automatically added. 1, 2, 3,
// 4,... and so on
//
// thanks
// Bob
//
// --- http://4qir.quantum-radio.net.au - Where Only The Dedicated Survive!
// 4QIR Quantum Radio. Bringing you the original sounds of AFVN, with some of
// the
// original DJ's - back on air - and supporting not only the original Vets, in
// comprehensive AFVN Archives, but putting together segments for the fighting
// men and
// women of todays services all around the world. World Music, for people of
// the world.
//
//
//
//

--
Principal Member Technical Staff, beyond.com The world is watching America,
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L______________________________________________ and America is watching TV. __

#3Christian Rudow
Christian.Rudow@thinx.ch
In reply to: Robert Chalmers (#1)
Re: [GENERAL] Is there an auto incrementing number field?

Robert Chalmers wrote:

I'm looking through the 6.5 specs, and wondering if there is an
Auto-Incrementing field in this release?

of if not, is there a way of achieving this end? So that as I add a new
record to a table, it's '#ID' for example is automatically added. 1, 2, 3,
4,... and so on

Im using "create sequence ...." on INTEGER id's.
You can also use SERIAL constraint (which does the same thing).

Try pgaccess to have a look at the current state of your sequences.
Nice.

Chris
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Christian Rudow E-Mail: Christian.Rudow@thinx.ch
ThinX networked business services Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#4Robert Chalmers
robert@chalmers.com.au
In reply to: Dustin Sallings (#2)
Re: [GENERAL] Is there an auto incrementing number field?

Ar ha. I see it all now. I tired to figure it out from that rather cryptic
detail in the docs. and couldn't make anything work. Now I know what it
does, I'll try again.

thanks folks
bc

----- Original Message -----
From: dustin sallings <dustin@spy.net>
To: Robert Chalmers <robert@chalmers.com.au>
Cc: <pgsql-general@hub.org>
Sent: Thursday, 24 June 1999 4:37
Subject: Re: [GENERAL] Is there an auto incrementing number field?

On Thu, 24 Jun 1999, Robert Chalmers wrote:

There has been for a while, it's called serial.

// I'm looking through the 6.5 specs, and wondering if there is an
// Auto-Incrementing field in this release?
//
// of if not, is there a way of achieving this end? So that as I add a new
// record to a table, it's '#ID' for example is automatically added. 1, 2,

3,

// 4,... and so on
//
// thanks
// Bob
//
// --- http://4qir.quantum-radio.net.au - Where Only The Dedicated

Survive!

// 4QIR Quantum Radio. Bringing you the original sounds of AFVN, with some

of

// the
// original DJ's - back on air - and supporting not only the original

Vets, in

// comprehensive AFVN Archives, but putting together segments for the

fighting

// men and
// women of todays services all around the world. World Music, for people

of

// the world.
//
//
//
//

--
Principal Member Technical Staff, beyond.com The world is watching

America,

pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin@spy.net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L______________________________________________ and America is watching

TV. __

Show quoted text