Generate char surrogate key

From: Josué Maldonado <josue(at)lamundial(dot)hn>
To: pgsql-general(at)postgresql(dot)org
Subject: Generate char surrogate key
Date: 2004-03-19 19:25:25
Message-ID: 405B4925.8010400@lamundial.hn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello list,

Have a table with char(3) column, the column should contain values like
'001','002','003'... and so on, keys must be correlatives no
'001','005','007' should be allowed, any idea how to get it done using a
trigger?

Thanks in advance

--

Josué Maldonado

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-03-19 19:48:01 Re: Generate char surrogate key
Previous Message Josh Berkus 2004-03-19 19:10:07 Re: another postgres article