From: | rohtodeveloper <rohtodeveloper(at)outlook(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Would you help to review our modifications |
Date: | 2014-10-20 14:34:25 |
Message-ID: | BAY178-W235CC8E580A931EAABC696C4970@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dear All,
L've got a question for you.
If the value of the integer type is converted to a value of type Boolean,PostgreSQL will display just like"The rule has already exist";
1. CREATE CAST (integer AS bool) WITH INOUT AS IMPLICIT;
ERROR: cast from type integer to type boolean already exists
If I want to drop the rule,will be told like"From integer to boolean type rules may not be dropped";
2. DROP CAST (integer AS bool) ;
ERROR: cannot drop cast from integer to boolean because it is required by the database system
Since the rule has already exist,Why execute the following methods will be in error?
3. insert into testbool(p1,p2)values(20,0::integer);
ERROR: column "p2" is of type boolean but expression is of type integer
So how to deal with this kind of situation if I want a implicit conversion?
Best Regards,
rohtodeveloper
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-10-20 14:34:34 | Re: Typos in comments |
Previous Message | Fabrízio de Royes Mello | 2014-10-20 14:01:25 | Re: Proposal : REINDEX SCHEMA |