From: | "Anton Melser" <melser(dot)anton(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Shane Ambler" <pgsql(at)007marketing(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: getting postgres to emulate mysql/sqlserver bit datatype |
Date: | 2007-02-12 21:16:17 |
Message-ID: | 92d3a4950702121316v5f43e1e3n1d59ac45d9e3e3bc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I think actually what he needs is what Peter suggested upthread, namely
> to weaken the context-restriction on the int-to-bool cast.
Indeed... Peter's suggestion seems to have solved all my problems. So
even though it probably shows just how embarrassingly bad my sql is...
update pg_cast set castcontext = 'i'
where (castsource = (select oid from pg_type where typname = 'bool')
and casttarget = (select oid from pg_type where typname = 'int4'))
or (castsource = (select oid from pg_type where typname = 'int4')
and casttarget = (select oid from pg_type where typname = 'bool'))
For the archives.
Thanks to everyone.
Anton
ps. This is probably only for situations where it is absolutely
necessary... but I am now passing my nunit tests! :-)
From | Date | Subject | |
---|---|---|---|
Next Message | Anton Melser | 2007-02-12 22:18:55 | Re: getting postgres to emulate mysql/sqlserver bit datatype |
Previous Message | Reid Thompson | 2007-02-12 20:41:19 | Re: Testing embedded SQL in C |