stored procedure / Function

From: "Alain Roger" <raf(dot)news(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: stored procedure / Function
Date: 2006-11-06 19:23:04
Message-ID: 75645bbb0611061123h61d3a6d6n8e0be7ca151a662c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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;
/**************************************/
BEGIN

SELECT articletypes.articletype_id INTO tpart FROM articletypes
WHERE articletypes.articletype_type = TypeArt;
....

but it seems that TypeArt VARCHAR := TypeOfArticle; does not
work....

Can you help me ?
thx.
AL.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Ramsey 2006-11-06 19:26:31 Re: PostGIS Binary RPM for Red Hat Linux
Previous Message Andrus 2006-11-06 19:21:54 How to force strong passwords