Re: Problem with function
От | Rich Hall |
---|---|
Тема | Re: Problem with function |
Дата | |
Msg-id | 401E5CC4.7080605@micropat.com обсуждение исходный текст |
Ответ на | Re: Problem with function (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-general |
>> 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 > > > --
В списке pgsql-general по дате отправления: