Search Postgresql Archives

Update existing system explicit cast to make it implicit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to use bit(1) datatype with existing application that used int datatype before.
So I tried to create implicit cast that will allow me not to make code modifications and wanted to create implicit cast "int2bit", but it turned out that there is already system cast.
Unfortunately this cast is explicit and I need to make it implicit (it can be made implicit only for one schema).

My question is that if there is any official way to overwrite this attribute instead of performing following query:

update pg_cast set castcontext = 'i' where oid in (
select c.oid
from pg_cast c
inner join pg_type src on src.oid = c.castsource
inner join pg_type tgt on tgt.oid = c.casttarget
where src.typname like 'int%' and tgt.typname like 'bit%')

Thank you in advance for advice.

Asia 

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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux