From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | Zvonimir Radek <zvonimir(dot)radek(at)eko(dot)hr>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: each line counter |
Date: | 2006-03-17 16:25:07 |
Message-ID: | 1142612707.1141.1.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, 2006-03-17 at 09:30, Richard Huxton wrote:
> Zvonimir Radek wrote:
> > Hi
> > I would like to add counter in front of each row with select
> > command.
>
> You can sort-of do this by creating a sequence and then dropping it
> after the query, but basically this is the sort of thing you do in the
> client application usually.
Note that you can create a temporary sequence for this. That way, if
two sessions need to do this at the same time they won't bump into each
other. Plus, the sequence gets automatically dropped at the end of your
session.
From | Date | Subject | |
---|---|---|---|
Next Message | SunWuKung | 2006-03-17 16:37:30 | Re: pgsql variables from records |
Previous Message | Martijn van Oosterhout | 2006-03-17 16:13:14 | Re: picking the correct locale when doing initdb |