Search Postgresql Archives

Re: row numbering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you insert the results of your query into a table with a serial
column, the serial column will do what you want..

Plus add a huge overload... ?


Having some sort of line numbering in result query would be nice...





----- Original Message ----- From: "Mike Harding" <mvh@xxxxxxxxxxxxx>
To: "Peter Eisentraut" <peter_e@xxxxxxx>
Cc: "josue" <josue@xxxxxxxxxxxx>; <pgsql-general@xxxxxxxxxxxxxx>
Sent: Saturday, February 26, 2005 1:27 AM
Subject: Re: row numbering



If you insert the results of your query into a table with a serial
column, the serial column will do what you want..

On Sat, 2005-02-26 at 01:10 +0100, Peter Eisentraut wrote:
josue wrote:
> is there a way return a column with the row number automatically
> generated according the way the rows were processed by the query.

No, but you can easily keep a counter in the client.

--
Mike Harding <mvh@xxxxxxxxxxxxx>


---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster



---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux