From: | "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Count(*) throws error |
Date: | 2007-07-11 21:00:36 |
Message-ID: | a47902760707111400q26555378s514ab9a5612ed3f4@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Hi,
I'm using the following statement in my plpgsql function
SELECT INTO no_rows COUNT(*) FROM tbl_concurrent;
I have decalred no_rows int4 and initialized it to zero
Running the function throws the following error:
ERROR: syntax error at or near "(" at character 13
QUERY: SELECT $1 (*) FROM tbl_concurrent
CONTEXT: SQL statement in PL/PgSQL function "sp_insert_tbl_concurrent" near
line 8
If i comment this count(*) line, the error goes.
I don't know why isn't count(*) working
Thanks
Jas
From | Date | Subject | |
---|---|---|---|
Next Message | Anton Melser | 2007-07-11 21:07:35 | Re: Postgres 8.2 binary for ubuntu 6.10? |
Previous Message | Andrew Sullivan | 2007-07-11 20:56:59 | Re: how does a temp table work? |
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Kaltenbrunner | 2007-07-11 21:03:19 | Re: minor compiler warning on OpenBSD |
Previous Message | Andrew Sullivan | 2007-07-11 20:54:13 | Re: 2PC-induced lockup |