Kovacs Zoltan writes:
> Maybe a trivial question, maybe it's foreign from SQL, I'dont know...
> How to add a column which stands for the row number in each row of the
> result? E.g.:
>
> row_no | column1 | column2 | ...
> -------+---------+---------+ ...
> 1 | datum11 | datum12 | ...
> 2 | datum21 | datum22 | ...
> ... | ... | ... | ...
>
> I didn't find anything in the docs.
Your client can do that. When you fetch the results you have to have some
sort of loop anyway, so you have (or keep) a counter there. There's no
use of the server generating this information, because the numbering is
implied by the order in which the rows are sent.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/