agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Alex Ignatov <a.ignatov@postgrespro.ru>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Strange DOMAIN behavior
Date: Thu, 09 Jul 2015 20:28:27 +0300
Message-ID: <559EAF3B.9070900@postgrespro.ru> (raw)
In-Reply-To: <CAKFQuwZcGygkNLQewcO-YhyMkgwax8WY9-z_4bkomZHOCp28_g@mail.gmail.com>
References: <559E470F.6020002@postgrespro.ru>
	<CAKFQuwYOZQ22qNtPe0m4w047DLhnDati8+Yqhcd6S2SOYL2GDQ@mail.gmail.com>
	<559E80E0.8000002@postgrespro.ru>
	<CAKFQuwbXQsGKZ6QLun_br+32cT0RUuNg8ct+B0f2fut4S3-K+w@mail.gmail.com>
	<559EA470.40201@postgrespro.ru>
	<CAKFQuwZcGygkNLQewcO-YhyMkgwax8WY9-z_4bkomZHOCp28_g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>



On 09.07.2015 19:50, David G. Johnston wrote:
> On Thu, Jul 9, 2015 at 12:42 PM, Alex Ignatov 
> <a.ignatov@postgrespro.ru <mailto:a.ignatov@postgrespro.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

view thread (7+ messages)

Message-ID: <559EAF3B.9070900@postgrespro.ru>
Permalink:  ../559EAF3B.9070900@postgrespro.ru/
Also on:    postgresql.org/message-id/559EAF3B.9070900@postgrespro.ru

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: a.ignatov@postgrespro.ru, david.g.johnston@gmail.com
  Subject: Re: Strange DOMAIN behavior
  In-Reply-To: <559EAF3B.9070900@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox