Marcin Inkielman writes:

> that is exactly i want to obtain. i would like to have:
> 
> 1 | first item
> 2 | second,
> 3 | ... and so on.
> 
> each time i do a select on a table and aways starting with a "1".

That is really something you should do on the front-end side, the backend
has no notion of this. It shouldn't prove exceedingly hard to make psql
print a row number in each line. In fact, the \x mode already does
that. We'd need to discuss whether this could be included as a mainstream
feature but I can see uses for it.

> the main problem i have with sequences (or temporary tables - as i think
> you suggest) is that i have multiples concurrent transactions at he same
> time. as they are generated by a single cgi script, if i use a sequence it
> will have the same name for each transaction, and therefore only the first
> trasaction will work.

Sequences work at insert time, not on select. That is, you effectively
need to decide on a number when creating the record; this is apparently
not what you want.


-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden

Reply via email to