Re: [HACKERS] plpgsql: RAISE

2001-08-02 Thread Richard Huxton
Bruce Momjian wrote: > > Can I ask where we are on this? Sure - posted a follow up to the list a while ago. Subject was "RAISE : state of play and request for advice" Currently, this works: CREATE FUNCTION foo_raise_loop(text) RETURNS text AS ' DECLARE a ALIAS FOR $1; i integer;

Re: [HACKERS] plpgsql: RAISE

2001-07-24 Thread Tom Lane
"Richard Huxton" <[EMAIL PROTECTED]> writes: > Actually, I like the idea of using the SQL system to evaluate expressions - > why reinvent the wheel? Sure, that part is great --- it's just the parsing (or lack of it, to be more accurate) that's an ugly hack. regards, tom l

Re: [HACKERS] plpgsql: RAISE

2001-07-23 Thread Richard Huxton
From: "Jan Wieck" <[EMAIL PROTECTED]> > Tom Lane wrote: > > and then the code takes care of swallowing expressions until ';', > > similarly to the way SQL commands are handled. (plpgsql's parsing > > methodology is sinfully ugly, isn't it? But I don't suppose you > > want to try to replace it..

Re: [HACKERS] plpgsql: RAISE

2001-07-23 Thread Jan Wieck
Tom Lane wrote: > and then the code takes care of swallowing expressions until ';', > similarly to the way SQL commands are handled. (plpgsql's parsing > methodology is sinfully ugly, isn't it? But I don't suppose you > want to try to replace it...) It is, indeed, and I'm sorry for that.

Re: [HACKERS] plpgsql: RAISE

2001-07-21 Thread Tom Lane
"Richard Huxton" <[EMAIL PROTECTED]> writes: > (For those who haven't looked at that bit of the code recently > plpgsql_read_expression() slurps up to and including a closing token - > either a ';' or ',' above. You've then lost that finishing token) The real problem is that this *isn't* yacc ...

[HACKERS] plpgsql: RAISE

2001-07-21 Thread Richard Huxton
Muggins here volunteered to get RAISE to accept any expression that evaluates to a string rather than just a string constant. Think I can see why it wasn't that way already. Had a look, and this is easy enough: RAISE NOTICE ''Hello '' || $1 || '' World''; Also, I can do: RAISE NOTICE ''Hello '