Re: Assignments in PL/pgSQL - Mailing list pgsql-sql

From Joe Conway
Subject Re: Assignments in PL/pgSQL
Date
Msg-id 3D8228C9.5080004@joeconway.com
Whole thread Raw
In response to Re: DISTINCT ON  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-sql
Josh Berkus wrote:
> I'm very surprised, too.   The "=" syntax is not per spec; my guess is, 
> somebody coded in compatibility for DB conversion purposes and left it there.  
> Jan?  Tom?
> 

I also noticed this the other day while messing with the plpgsql lexer:

/* ---------- * The keyword rules * ---------- */
:=        { return K_ASSIGN; }
=         { return K_ASSIGN; }

This code goes back to the original scan.l from 1998. I'm guessing it has 
always worked, but was never documented -- but I've been known to be wrong 
sometimes ;-). Hopefully Jan will chime in.

Joe



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Assignments in PL/pgSQL
Next
From: Jan Wieck
Date:
Subject: Re: Assignments in PL/pgSQL