plpgsql raise - parameters can be expressions

From: Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>
To: pgsql-patches(at)postgresql(dot)org
Subject: plpgsql raise - parameters can be expressions
Date: 2005-06-13 05:07:39
Message-ID: Pine.LNX.4.44.0506130700400.16737-200000@kix.fsv.cvut.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hello,

I did trivial patch which eliminate limit raise command. Using
expressions instead of variables are a little bit expensive, but little.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

pokus=# create or replace function x() returns void as $$
declare c integer[] = '{10,20,30}'; a integer = 3;b record;
begin b := row(1,2);
raise notice 'sss % % % % % % % % %', interval '23 hour',
1, current_user, c,now(), c[1],
(select * from fx where 1 = 0 limit 1),
null,current_timestamp::timestamp(0);
end; $$ language plpgsql;
CREATE FUNCTION
pokus=# select x();
NOTICE: sss 23:00:00 1 root {10,20,30} 2005-06-13 07:06:07.43569+02 10
<NULL> <NULL> 2005-06-13 07:
06:07

Regards
Pavel Stehule

Attachment Content-Type Size
raise.diff text/plain 9.8 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2005-06-13 05:13:22 Re: plpgsql raise - parameters can be expressions
Previous Message Tom Lane 2005-06-13 04:39:14 Re: BUG #1707: statistics collector starts with stats_start_collector = false