Search Postgresql Archives

Re: passing strings to functions

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

 



Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> I can't understand how to pass strings to functions.

Your problem isn't with the strings, it's with the smallint parameter.
The undecorated "1" is an integer not a smallint, and it won't be
silently cast in this particular scenario.

> Is there a simpler way than casting everytime?

I'd suggest declaring the function to take integer.  If you really want
the rowtype to use smallint then you can cast internally.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

[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