Thread

  1. aliasing table name in update

    Holger Klawitter <holger@klawitter.de> — 2001-04-10T07:35:24Z

    Hi there,
    
    Upgrading from 7.0.3 to 7.1(rc4) went very smooth - but a small
    issue came up:
    
    The following statement does not work any more:
    	update l set i=2 from longname l where l.i=1;
    
    Not a big problem, but you should know ;-)
    
    With kind regards / Mit freundlichem Gruß
        Holger Klawitter
    --
    Holger Klawitter
    holger@klawitter.de                             http://www.klawitter.de
    
    
  2. Re: aliasing table name in update

    Tom Lane <tgl@sss.pgh.pa.us> — 2001-04-13T17:20:31Z

    Holger Klawitter <holger@klawitter.de> writes:
    > Upgrading from 7.0.3 to 7.1(rc4) went very smooth - but a small
    > issue came up:
    
    > The following statement does not work any more:
    > 	update l set i=2 from longname l where l.i=1;
    
    I'd say it's a fluke that that ever was accepted.  Given the obvious
    ambiguity of interpretation (suppose there is a table named l?), it
    should be rejected IMHO.
    
    There has been some talk of allowing
    
    	update longname [as] l set ...
    
    but we do not currently accept that.
    
    			regards, tom lane