On Fri, Feb 6, 2015 at 10:23 AM, Adrian Klaver <adrian.kla...@aklaver.com>
wrote:

>
>> CREATE FUNCTION validateSession(session_id char(64),client_ip
>> inet,user_agent char(40),forcedTimeout bigint,sessionTimeout bigint)
>> RETURNS json AS  $$
>>
>

> CREATE OR REPLACE FUNCTION public.validatesession(s_id character,
> client_ip inet, user_agent character, forcedtimeout bigint, sessiontimeout
> bigint)
>  RETURNS json
>
>
​As an aside, and going from memory, you will note that Adrian kept the
"character" type in the function signature​

​but removed the length specifier.  PostgreSQL does not store that
information and so will not prevent a call from passing in a string longer
than 64 characters into the function.  This applies to any specification in
() following a type declaration (say for numeric or timestamptz)

David J.

​

Reply via email to