>>
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" <frank@chagford.com> 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
>
>
>
--