Snyder, James, 29.03.2010 18:25:
Thanks for all the dialog on this subject.
My "version" was derived from the postgreSQL's .jar file (specifically named
"postgresql-8.4-701.jdbc4.jar") that I'm using. When I do the following:
select version()
I get the following:
PostgreSQL 8.3.6
Then you
ng to check this out.
Thanks...Jim
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Thomas Kellerer
Sent: Friday, March 26, 2010 3:15 AM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] SQL syntax rowcount value as an extra colu
Jayadevan M, 26.03.2010 07:56:
Thank you for setting that right. Apologies for not checking version.
The orginal poster stated that he is using 8.4, so that solution will work for
him.
Thomas
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
Hi,
>It works, but you should use a recent version:
>test=*# select count(1) over (), i from foo;
> count | i
>---+
> 8 | 1
> 8 | 2
> 8 | 3
> 8 | 6
> 8 | 7
> 8 | 9
> 8 | 13
> 8 | 14
>(8 rows)
> test=*# select version();
>
In response to Jayadevan M :
> Hi,
> I don't think so.
> Oracle -
> SQL> select count(*) over () as ROWCOUNT , first_name from people;
>
> ROWCOUNT FIRST_NAME
> --
> -
> ---
> 6 Mary
Regards,
Jayadevan
From: Thomas Kellerer
To: pgsql-sql@postgresql.org
Date: 26/03/2010 03:26
Subject: Re: [SQL] SQL syntax rowcount value as an extra column in
the result set
Sent by:pgsql-sql-ow...@postgresql.org
Snyder, James wrote on 25.03.2010 22:33:
> I’m using Postg
such a query (cartesian
join)
Regards,
Jayadevan
From: "Snyder, James"
To:
Date: 26/03/2010 03:21
Subject: [SQL] SQL syntax rowcount value as an extra column in the
result set
Sent by:pgsql-sql-ow...@postgresql.org
Hello
I’m using PostgreSQL (8.4.701) and
Snyder, James wrote on 25.03.2010 22:33:
I’m using PostgreSQL (8.4.701)
There is no such version.
The current version is 8.4.3
On a side note, Oracle allows the following syntax to achieve the above:
select count(*) over () as ROWCOUNT , first_name from people
The same syntax will work on
Hello
I'm using PostgreSQL (8.4.701) and Java (jdbc,
postgresql-8.4-701.jdbc4.jar) to connect to the database.
My question is: what is the SQL syntax for PostgreSQL to achieve the
following:
I want to receive the rowcount along with the rest of a result set. For
example, let's say the following