Search Postgresql Archives

Re: A Query that works standalone but not in a f(x)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ralph Smith <rsmith@xxxxxxxxxxx> writes:
> Within the function I have:

> for darec in select * from purchbt where addr not like ''%STE%STE%'' and 
> addr not like ''%STE%STE%STE%'' and  (addr similar to 
> ''%STE[A-Z]*[0-9]+'' or addr similar to ''%STE[A-Z]*[0-9]+[A-Z]'' or 
> addr similar to ''%STE[A-Z]*[0-9]+[A-Z][A-Z]'')  loop

> and it finds no records.
> Outside the function, replace '' with ', I DO get the results I expect.

Maybe "addr" is the name of a local variable inside the function?
Pre-9.0, that sort of ambiguity can bite you pretty easily.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux