Search Postgresql Archives

Re: UUID can be written to row when passed as parameter/argument to a PL/pgSQL function. Feature or bug?

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

 



Thanks for the suggestion of casting the hex string to uuid. That works. 

I tried the standard syntax using "CAST":

VALUES ( CAST( $1 AS uuid) )

--Basil Bourque

> How about:
> CREATE OR REPLACE FUNCTION public.uuid_write_(character varying)
> RETURNS boolean
> LANGUAGE plpgsql
> AS $function$
> 
> BEGIN
>        INSERT INTO uuid_tbl_ ( uuid_col_ )
>        VALUES ( $1::uuid );
>        RETURN True;
> END;

-- 
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