Thread

  1. Newbie Questions, PostgreSQL

    Sze Yuen Wong <swong_@yahoo.com> — 1998-10-15T17:13:07Z

    Hi,
    
     I'm new to PostgreSQL and I've got the following questions:
    
    
     1.What is wrong with the following PostgreSQL statement?
     
     CREATE RULE r1 AS ON INSERT TO TBL1 DO [INSERT INTO TBL2 values
    (new.i); 
    NOTIFY TBL2];
     
            I got the following error messages following its execution:
     
            ERROR: parser: parse error at pr near ""
            ERROR: parser: parse error at pr near "]"
            
    ++++++++++++++++++++++++++++++++++++++++++++++++++++
     
            2.  When I type \E and \e to the psql prompt, there does not
    seem to be any difference:  both invoke vi and execute my SQL
    statement upon exit from vi.  My understanding is that \E should do
    execution following editing whereas \e does do editing.  Am I right?
     
    
    Thank you very much.
    
    Sze Wong
    
    _________________________________________________________
    DO YOU YAHOO!?
    Get your free @yahoo.com address at http://mail.yahoo.com
    
    
    
  2. RE: [GENERAL] Newbie Questions, PostgreSQL

    Taral <taral@mail.utexas.edu> — 1998-10-15T18:30:34Z

    >  1.What is wrong with the following PostgreSQL statement?
    >
    >  CREATE RULE r1 AS ON INSERT TO TBL1 DO [INSERT INTO TBL2 values
    > (new.i);
    > NOTIFY TBL2];
    >
    >         I got the following error messages following its execution:
    >
    >         ERROR: parser: parse error at pr near ""
    >         ERROR: parser: parse error at pr near "]"
    
    You want " and ", not [ and ]. And you will need to specify LANGUAGE "SQL"
    as well, I think.
    
    Taral
    
    
    
  3. RE: [GENERAL] Newbie Questions, PostgreSQL

    Marc G. Fournier <scrappy@hub.org> — 1998-10-16T12:23:08Z

    On Thu, 15 Oct 1998, Taral wrote:
    
    > >  1.What is wrong with the following PostgreSQL statement?
    > >
    > >  CREATE RULE r1 AS ON INSERT TO TBL1 DO [INSERT INTO TBL2 values
    > > (new.i);
    > > NOTIFY TBL2];
    > >
    > >         I got the following error messages following its execution:
    > >
    > >         ERROR: parser: parse error at pr near ""
    > >         ERROR: parser: parse error at pr near "]"
    > 
    > You want " and ", not [ and ]. And you will need to specify LANGUAGE "SQL"
    > as well, I think.
    
    And, up until v6.4 (to be released), I *thought* that rules were actually
    broken...
    
    Marc G. Fournier                               scrappy@hub.org
    Systems Administrator @ hub.org                    
    scrappy@{postgresql|isc}.org                       ICQ#7615664