Re: [GENERAL] Stored Procedure / function and their result

2007-03-19 Thread Albe Laurenz
Alain Roger wrote: > I would like to know if there is a better way how to retrieve > result from a stored procedure (function) than to use 'AS > res(col1 varchar, col2 timestamp,..)' > > for example, here is a stored procedure : > CREATE OR REPLACE FUNCTION SP_A_003(username VARCHAR) > RETURN

Re: [GENERAL] Stored Procedure / function and their result

2007-03-19 Thread Martijn van Oosterhout
On Mon, Mar 19, 2007 at 01:54:14PM +0100, Alain Roger wrote: > Hi, > > I would like to know if there is a better way how to retrieve result from a > stored procedure (function) than to use 'AS res(col1 varchar, col2 > timestamp,..)' Sure, create a type with the relevent field name and use that in

[GENERAL] Stored Procedure / function and their result

2007-03-19 Thread Alain Roger
Hi, I would like to know if there is a better way how to retrieve result from a stored procedure (function) than to use 'AS res(col1 varchar, col2 timestamp,..)' for example, here is a stored procedure : CREATE OR REPLACE FUNCTION SP_A_003(username VARCHAR) RETURNS SETOF RECORD AS $BODY$ DECLAR

Re: [GENERAL] stored procedure / Function

2006-11-07 Thread Alban Hertroys
Alain Roger wrote: Hi, How to retrieve the IN parameter of a function for later use ? i tried this : CREATE OR REPLACE FUNCTION "public"."SP_U_001" ("TypeOfArticle" varchar) RETURNS SETOF "public"."active_articles" AS My advice: Don't quote your identifiers unless you really really want the

[GENERAL] stored procedure / Function

2006-11-06 Thread Alain Roger
Hi,How to retrieve the IN parameter of a function for later use ?i tried this :CREATE OR REPLACE FUNCTION "public"."SP_U_001" ("TypeOfArticle" varchar) RETURNS SETOF "public"."active_articles" AS $body$DECLARE  TypeArt VARCHAR := TypeOfArticle;    rec RECORD;    res active_articles;/***