Squences with letters aswell as numbers

From: "NubeY" <dominic_wormald(at)yahoo(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Squences with letters aswell as numbers
Date: 2006-02-28 16:46:45
Message-ID: 1141145205.432220.183670@v46g2000cwv.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

At the moment I'm using this kind of sequence to provide a primary key
for some of my tables

create sequence group_seq;
select setval('group_seq', (select max(group_ID) from groups));

However I'd like to create a sequence that has this kind of output

g1
g2
g3
g4
g5

where g doesn't change

and

u1
u2
u3

where u doesn't change

is there are simple way of doing this?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message crdandridge1 2006-02-28 17:46:51
Previous Message Sean Davis 2006-02-28 11:34:41 Re: How to enable remote anoymous logins? (+ admin