Re: getting postgres to emulate mysql/sqlserver bit datatype

Поиск
Список
Период
Сортировка
Искать
От
Anton Melser
Тема
Re: getting postgres to emulate mysql/sqlserver bit datatype
Дата
Msg-id
92d3a4950702121316v5f43e1e3n1d59ac45d9e3e3bc@mail.gmail.com
Ответ на
Список
Дерево обсуждения
getting postgres to emulate mysql/sqlserver bit datatype "Anton Melser" <melser.anton@gmail.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype Peter Eisentraut <peter_e@gmx.net>
Re: getting postgres to emulate mysql/sqlserver bit datatype "Joshua D. Drake" <jd@commandprompt.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype Tom Lane <tgl@sss.pgh.pa.us>
Re: getting postgres to emulate mysql/sqlserver bit datatype "Anton Melser" <melser.anton@gmail.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype Jeff Davis <pgsql@j-davis.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype Shane Ambler <pgsql@007Marketing.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype Tom Lane <tgl@sss.pgh.pa.us>
Re: getting postgres to emulate mysql/sqlserver bit datatype "Anton Melser" <melser.anton@gmail.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype "Anton Melser" <melser.anton@gmail.com>
Re: getting postgres to emulate mysql/sqlserver bit datatype Tom Lane <tgl@sss.pgh.pa.us>
Re: getting postgres to emulate mysql/sqlserver bit datatype "Anton Melser" <melser.anton@gmail.com>
> 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! :-)
В списке pgsql-general по дате отправления
От: HT NB
Дата:
Сообщение: Testing embedded SQL in C
От: Reid Thompson
Дата:
Сообщение: Re: Testing embedded SQL in C
FAQ