Re: serial data type usage

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: serial data type usage
Date: 2008-11-06 20:10:02
Message-ID: 200811061210.02964@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 06 November 2008, "EXT-Rothermel, Peter M"
<Peter(dot)M(dot)Rothermel(at)boeing(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michelle Konzack 2008-11-06 20:39:31 Re: Equivalent for AUTOINCREMENT?
Previous Message Jonathan Guthrie 2008-11-06 20:04:17 Re: I'm no longer puzzled by a foreign key constraint problem