is it bug? - printing boolean domains in sql/xml function - Mailing list pgsql-hackers

From Pavel Stehule
Subject is it bug? - printing boolean domains in sql/xml function
Date
Msg-id CAFj8pRAzNcRe_O0TVcr8KtaBbUA1sUzRbuuKQFNdy26bq8KVnA@mail.gmail.com
Whole thread Raw
Responses Re: is it bug? - printing boolean domains in sql/xml function
List pgsql-hackers
Hello

related to http://www.postgresql.org/message-id/CAFj8pRDTAVfNrAzwEt+ewMfRBDZFfVa8W17Kk_E12fb6T-ZNXQ@mail.gmail.com

boolean domains is serialised to string different than boolean

postgres=# CREATE DOMAIN booldomain as bool;
CREATE DOMAIN

-- fully expected behave
postgres=# select true, true::booldomain;bool | booldomain
------+------------t    | t
(1 row)

postgres=# select true::text, true::booldomain::text;text | text
------+------true | true
(1 row)

-- unexpected behave
postgres=# select xmlforest(true as bool, true::booldomain as booldomain);                 xmlforest
---------------------------------------------<bool>true</bool><booldomain>t</booldomain>
(1 row)

is it expected behave?

Regards

Pavel



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: enhanced error fields
Next
From: Boszormenyi Zoltan
Date:
Subject: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]