Redirected to Questions list. (It is cool to say that.)
> -----Original Message-----
> hello all,
> yep, i'm new to postgres so please bare with me. if this isn't the
> correct place to ask these questions, please point me in the right
I know how you feel.
> first and foremost,
> i need to have a field (say pin) that is the primary key of a given
> relation. each time a record gets added to this relation, the pin
> increases by 1. thus making an auto increasing primary key (i.e. a
> unique identifier for each record that isn't explicitly increased by
> the dbms does it for me.)
What you are looking for is a sequence. Try
man create_sequence (or '\h create sequence' in psql).
create sequence myseq start 0 minvalue 0 cycle;
create table mytbl (
mykey int4 default nextval('myseq') primary key,
when you do an insert you'll have to explicitly skip mykey.
insert into mytbl(mydata1, ...)
values ('Hello, world');
> i have a platform related installation question, which list should be
I'll let someone else answer this on from fear of being wrong.
> -brian (postgres(at)peanuts(dot)roanoke(dot)edu)
pgsql-hackers by date
|Next:||From: David Gould||Date: 1998-03-16 23:27:02|
|Subject: Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6|
|Previous:||From: Dwayne Bailey||Date: 1998-03-16 21:22:46|
|Subject: Alpha initdb fixed!|