Search Postgresql Archives

Re: varchar for loops possible?

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

 



"J.V." <jvsrvcs@xxxxxxxxx> writes:
>      for tmp_var in select distinct(value) from mytable where 
> value2='literal'
> tmp_var has to be in  ' ' ticks or will not work.  it is failing on the 
> first FOR statment stating:  "invalid input syntax for integer: 
> "some_distinct_value".

Um, how do you have tmp_var declared?  plpgsql seems to be acting
as though it's an integer variable, which is not what you need if
"value" is a varchar.

			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