Functions

From: Simon Drabble <simon(at)eskimo(dot)com>
To: Postgres Group <pgsql-general(at)postgreSQL(dot)org>
Subject: Functions
Date: 1999-11-03 20:04:34
Message-ID: Pine.LNX.4.10.9911031459380.20207-100000@dragon.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ok, following on from the previous stuff, I'm now trying to put that update
into a function. How can I reference the passed parameter(s)?

CREATE FUNCTION fn_fubar(int4) AS
'UPDATE foo SET bar = tmp.numb FROM tmp WHERE tmp.numb = $$'
LANGUAGSE 'sql';

where $$ would be the parameter passed to the function:

SELECT fn_fubar(20);

Simon
Buying a SQL book this weekend :)

--
"Linux - open doors, not windows."

Simon Drabble It's like karma for your brain.
simon(at)eskimo(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Timothy H. Keitt 1999-11-03 20:05:34 Re: [GENERAL] query seems too slow
Previous Message Simon Drabble 1999-11-03 19:59:00 Re: [GENERAL] Dynamic update