Re: serial data type usage - Mailing list pgsql-general

From Alan Hodgson
Subject Re: serial data type usage
Date
Msg-id 200811061210.02964@hal.medialogik.com
Whole thread Raw
In response to serial data type usage  ("EXT-Rothermel, Peter M" <Peter.M.Rothermel@boeing.com>)
List pgsql-general
On Thursday 06 November 2008, "EXT-Rothermel, Peter M"
<Peter.M.Rothermel@boeing.com> wrote:
> I have thought about using the serial data type for the employee.id but
> I also want to automate the prepending of the { W, M, E } prefix.
>

You'll need write a before-insert trigger to assign the ID.

--
Alan

pgsql-general by date:

Previous
From: Jonathan Guthrie
Date:
Subject: Re: I'm no longer puzzled by a foreign key constraint problem
Next
From: Craig Ringer
Date:
Subject: Re: I'm no longer puzzled by a foreign key constraint problem