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

Поиск
Список
Период
Сортировка
От Basil Bourque
Тема Re: UUID can be written to row when passed as parameter/argument to a PL/pgSQL function. Feature or bug?
Дата
Msg-id CFDB84E5-5C01-4222-8601-51B62039E794@me.com
обсуждение исходный текст
Ответ на 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>)
Список 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 по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Compression
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: How can you have an Exclusive Lock on nothing? please help me understand this lock monitoring query output