Re: [HACKERS] Error in new psql - Mailing list pgsql-hackers

From wieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] Error in new psql
Date
Msg-id m11wabi-0003kGC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to Re: [HACKERS] Error in new psql  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] Error in new psql
Re: [HACKERS] Error in new psql
List pgsql-hackers
Bruce Momjian wrote:

> > Peter,
> >
> >     I  just  noticed  that  the new psql doesn't handle semicolon
> >     inside of unmatched parentheses correct any more. This  is  a
> >     requirement  for defining multi action rules and was properly
> >     supported by v6.5.* psql.
> >
> >     The CURRENT version submits the query buffer as soon,  as  it
> >     encounters  the  first semicolon outside of a string literal,
> >     and that is wrong according to the definition of CREATE RULE.
>
> I assume you mean:
>
>    test=> select (;)
>    ERROR:  parser: parse error at or near ")"

Kinda,

    actually I meant

        CREATE RULE myrule AS ON DELETE TO mytable DO (
            DELETE FROM myothertab1 WHERE key = old.key;
            DELETE FROM myothertab2 WHERE key = old.key;
        );
        ERROR:  parser: parse error at or near ""

    This is a possible syntax which (IIRC) got released with v6.4
    and  is  subject  to  the  examples  in   the   rule   system
    documentation.   The  parser still accepts it, so breaking it
    due to changes in  psql  is  an  IMHO  unacceptable  backward
    incompatibility.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Error in new psql
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Error in new psql