Skip site navigation (1) Skip section navigation (2)

Re: Problem with function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Frank Millman" <frank(at)chagford(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problem with function
Date: 2004-02-01 01:53:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
"Frank Millman" <frank(at)chagford(dot)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

In response to


pgsql-general by date

Next:From: Eric RidgeDate: 2004-02-01 01:56:14
Subject: Re: Very slow query - why?
Previous:From: Culley HarrelsonDate: 2004-02-01 00:51:03
Subject: Re: Unicode vs SQL_ASCII DBs

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group