I'm looging for a way to use tebool type records in plpgsql method starting 
from Postgres 9.1
I tried code below but got error

domain tebool does not allow null values
Domain tebool default value is false so plpgsql must assing false to it and 
should not throw error.

How to fix this so that such record variable can created ?

Andrus.

CREATE DOMAIN tebool AS bool DEFAULT false NOT NULL;
create temp table test  ( test tebool ) on commit drop ;
CREATE OR REPLACE FUNCTION test()
      RETURNS numeric AS $$
DECLARE
   r_test test;
   begin
return 0;
   end;  $$ language plpgsql;
select test();

Posted also in
http://stackoverflow.com/questions/32157166/how-to-fix-domain-tebool-does-not-allow-null-values-in-plpgsql-function


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to