Re: [GENERAL] Initializing variables from SQL query

2009-03-19 Thread Adrian Klaver
On Thursday 19 March 2009 5:25:03 pm jc_mich wrote: > Hi all > > I'm new in PL/PGSQL developing, I'm trying to initialize a variable from a > SQL query, this query counts some rows, I've made the next code, but it > doesn't work. > > CREATE FUNCTION schema.myFunction() RETURNS BOOLEAN AS $$ > DECLA

[GENERAL] Initializing variables from SQL query

2009-03-19 Thread jc_mich
Hi all I'm new in PL/PGSQL developing, I'm trying to initialize a variable from a SQL query, this query counts some rows, I've made the next code, but it doesn't work. CREATE FUNCTION schema.myFunction() RETURNS BOOLEAN AS $$ DECLARE counter RECORD; BEGIN SELECT * INTO STRICT counter