Re: Grammar-problems with pl/pgsql in gram.y

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: K(dot)Reger(at)gmx(dot)de
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Grammar-problems with pl/pgsql in gram.y
Date: 2001-05-18 21:28:01
Message-ID: 200105182128.RAA29847@jupiter.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Klaus Reger wrote:
> Am Mittwoch, 16. Mai 2001 16:10 schrieb Jan Wieck:
> > Here it is. stmt_else is defined as type <stmts>, not <stmt>.
> > The PLpgSQL_stmt_if struct has a condition query and two
> > statement lists (type <stmts>). You're trying to put a single
> > statement into the else part instead of a list of statements.
> Thank you for the hint! That was it.
>
> > Maybe it'll work if you surround it with another
> > PLpgSQL_stmts struct where your new PLpgSQL_stmt_if is the
> > only statement in it's list. Since I have some bigger work
> > outstanding for PL/pgSQL, send the resulting patch (if you
> > get it to work) directly to me.
> The patch follows this message. May you tell me what kind of work it is,
> cause I'm so curous :-). By the way, the next thing I try is a
> EXCEPTION WHEN OTHER-clause, like in Oracle. Let's look if I'm successful.

Patch applied.

Really a smart solution, just touching the gram.y and scan.l
files and using the existing instruction code. Thanks for
the contribution.

What about a CASE ... WHEN ...? I think that could be
implemented in a similar way. Don't do it right now, I might
be ready to commit the cursor stuff early next week and it'll
touch alot more than just the grammar and scanner.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-05-18 22:07:24 Re: Grammar-problems with pl/pgsql in gram.y
Previous Message Bruce Momjian 2001-05-18 20:17:52 #ifdef OLD_FILE_NAMING