| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> | 
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | is it bug? - printing boolean domains in sql/xml function | 
| Date: | 2013-01-13 06:54:11 | 
| Message-ID: | CAFj8pRAzNcRe_O0TVcr8KtaBbUA1sUzRbuuKQFNdy26bq8KVnA@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hello
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Boszormenyi Zoltan | 2013-01-13 09:15:07 | Re: Proposal for Allow postgresql.conf values to be changed via SQL [review] | 
| Previous Message | Pavel Stehule | 2013-01-13 06:13:34 | Re: enhanced error fields |