Hi,

    now  I'm  really  sure that at least only a few ppl might use
    the current rule system.

    Psql cannot send the queries for DEFINE  RULE  with  multiple
    actions  to  the  backend. For this feature, the single colon
    separated statements are enclosed in []'s. But  psql  doesn't
    handle  []'s  and sends down the query at the first occurence
    of a colon. And a colon cannot be escaped in  psql,  it  must
    occur in a literal string.

    The question is now, should we tell psql that []'s have to be
    treated like ()'s or should we change the  syntax  of  CREATE
    RULE in the backends parser from [] to ()?


Jan

--

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



Sat, 15 Aug 1998 20:17:07 +0200 (MET DST)
jwieck@debis.com (Jan Wieck)
Psql doesn't allow multiple action rules
jwieck@debis.com (Jan Wieck) writes:
>     The question is now, should we tell psql that []'s have to be
>     treated like ()'s or should we change the  syntax  of  CREATE
>     RULE in the backends parser from [] to ()?

Is the syntax of CREATE RULE defined by the SQL standard (or modeled
on something else that is in the standard), or are we just making it
up out of whole cloth?

If it's defined by the standard then I think we have no choice but to
change psql.

If it's our own invention, I think switching to () might be a better
idea.  I'm not that worried about changing psql, but I do wonder how
many other applications might "know" a similar amount about SQL
syntax...

			regards, tom lane

Sun, 16 Aug 1998 11:30:56 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Psql doesn't allow multiple action rules 
> jwieck@debis.com (Jan Wieck) writes:
> >     The question is now, should we tell psql that []'s have to be
> >     treated like ()'s or should we change the  syntax  of  CREATE
> >     RULE in the backends parser from [] to ()?
> 
> Is the syntax of CREATE RULE defined by the SQL standard (or modeled
> on something else that is in the standard), or are we just making it
> up out of whole cloth?
> 
> If it's defined by the standard then I think we have no choice but to
> change psql.
> 
> If it's our own invention, I think switching to () might be a better
> idea.  I'm not that worried about changing psql, but I do wonder how
> many other applications might "know" a similar amount about SQL
> syntax...

Yes, if standard requires[], then let's use it.  If not, use ().

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Sun, 16 Aug 1998 13:21:56 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Psql doesn't allow multiple action rules