uom := (select uom from prodclass where code = prod_class) ;


Now I want to know why this syntax even compiles!?
What does this mean in plpgsql and where can I find a discussionin the documentation?


Rick


Tom Lane wrote:


"Frank Millman" <[EMAIL PROTECTED]> writes:


uom := (select uom from prodclass where code = prod_class) ;


^^^ ^^^

It's a bad idea to use plpgsql variable names that match fields of your
tables.  In this case, since the variable uom starts out NULL, the
select effectively reads "(select NULL from ...)".

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match




--





---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Reply via email to