Re: Is this possible?

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Is this possible?
Date: 2001-05-11 17:24:17
Message-ID: 20010511112417.A20524@cc.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql

On Tue, May 08, 2001 at 09:16:56PM -0400, Wei Weng wrote:
> I have a table that has a serial for primary key. Is it possible to get
> the new available primary key right after I insert a row of new entry?

Yeah. Se the documentation on triggers.

-Roberto
--
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net
http://www.sdl.usu.edu - Space Dynamics Lab, Developer
"Data! I thought you were dead!" "No, Sir. I rebooted."

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-05-11 19:12:26 Re: psql
Previous Message Julian Gollop 2001-05-11 16:07:14 RE: FATAL cannot create init file... why?

Browse pgsql-sql by date

  From Date Subject
Next Message Kaare Rasmussen 2001-05-11 18:15:53 Re: number of days in a month
Previous Message Sylte 2001-05-11 17:15:55 Re: Informix->PostgreSQL database convertion