From: | Alex Ignatov <a(dot)ignatov(at)postgrespro(dot)ru> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Strange DOMAIN behavior |
Date: | 2015-07-09 17:28:27 |
Message-ID: | 559EAF3B.9070900@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 09.07.2015 19:50, David G. Johnston wrote:
> On Thu, Jul 9, 2015 at 12:42 PM, Alex Ignatov
> <a(dot)ignatov(at)postgrespro(dot)ru <mailto:a(dot)ignatov(at)postgrespro(dot)ru>>wrote:
>
> DROP FUNCTION lexema_test( );
> CREATE OR REPLACE FUNCTION lexema_test()
> RETURNS VOID AS $body$
> DECLARE
> lex lexema :=new_lexema();
> BEGIN
> END;
> $body$
> LANGUAGE PLPGSQL
> SECURITY DEFINER;
>
> Then I got:
> ERROR: default value for row or record variable is not supported
> LINE 17: lex lexema :=new_lexema();
>
>
>
>
> ​Undocumented limitation :(
>
> While slightly more verbose you simply need to:
>
> DECLARE lex lexema;
> BEGIN
> lex := new_lexema();
> [...]
>
> David J.
>
Thats sad =(. But it is not so gracefully to initialize composite type
in the begin block as it would be in declare block %).
Thank you for yours answers!
--
Alex Ignatov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
From | Date | Subject | |
---|---|---|---|
Next Message | JORGE MALDONADO | 2015-07-09 23:10:19 | How to insert a carriage return and line field between fields in a query |
Previous Message | David G. Johnston | 2015-07-09 16:50:53 | Re: Strange DOMAIN behavior |