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

From: Basil Bourque <basil(dot)list(at)me(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: UUID can be written to row when passed as parameter/argument to a PL/pgSQL function. Feature or bug?
Date: 2011-04-15 05:20:00
Message-ID: CFDB84E5-5C01-4222-8601-51B62039E794@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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;

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2011-04-15 07:42:58 Re: How can you have an Exclusive Lock on nothing? please help me understand this lock monitoring query output
Previous Message Craig Ringer 2011-04-15 04:37:10 Re: Compression