Re: [GENERAL] SELECT statement in stored procedure

2006-07-01 Thread Alan Hodgson
On Saturday 01 July 2006 09:08, "Alain Roger" <[EMAIL PROTECTED]> wrote: > it works but i get all fields from my accounts table. > > So how can i get only login and status ? > Define a composite type that includes only those fields and return SETOF that_new_type instead of SETOF accounts. Or sel

[GENERAL] SELECT statement in stored procedure

2006-07-01 Thread Alain Roger
Hi, I have the following stored procedure : CREATE OR REPLACE FUNCTION immense_sp001(IN username VARCHAR, IN strhash VARCHAR) RETURNS SETOF accounts LANGUAGE plpgsql AS ' DECLARE Profile_Detected INTEGER :=0; act accounts%ROWTYPE; rec RECORD;