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

From Basil Bourque
Subject Re: UUID can be written to row when passed as parameter/argument to a PL/pgSQL function. Feature or bug?
Date
Msg-id CFDB84E5-5C01-4222-8601-51B62039E794@me.com
Whole thread Raw
In response to Re: UUID can be written to row when passed as parameter/argument to a PL/pgSQL function. Feature or bug?  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
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;

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Compression
Next
From: Simon Riggs
Date:
Subject: Re: How can you have an Exclusive Lock on nothing? please help me understand this lock monitoring query output