Count(*) throws error - Mailing list pgsql-general

From Jasbinder Singh Bali
Subject Count(*) throws error
Date
Msg-id a47902760707111400q26555378s514ab9a5612ed3f4@mail.gmail.com
Whole thread Raw
Responses Re: Count(*) throws error
Re: Count(*) throws error
Re: Count(*) throws error
List pgsql-general
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

pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: how does a temp table work?
Next
From: "Anton Melser"
Date:
Subject: Re: Postgres 8.2 binary for ubuntu 6.10?