OK, Answered my own question #1:
Data type SERIAL or using CREATE SEQUENCE.
--
Luke Pascoe
"Pestilence" <me@work.com> wrote in message
news:3c910d7d$1@news.nz.asiaonline.net...
> I'm a child of Oracle and MS-SQL (forgive me) and have only been playing
> with Postgres for a few days. I have 3 questions that I couldn't find
> answers for in the online docs:
>
> 1) Is it possible to create an INT PRIMARY KEY column that automagically
> numbers itself? MS-SQL does this using the IDENTITY keyword.
>
> 2) The ISNULL function in both Oracle and MS-SQL takes 2 numbers and
returns
> the second if the first is null, otherwise it returns the first. ISNULL in
> Postgres seems to be something quite different. Before I go writing my own
> function to do it, is there one already?
>
> 3) How do I do 'IF this_sql THEN that_sql'? I keep getting:
> parse error at or near "IF"
> --
>
> ================================
> Luke Pascoe
> Senior Developer
> IT Support & Development Limited
> http://wwwitsd.co.nz
> Mobile: (021) 303019
> Email: luke@itsd.co.nz
> ================================
>
>