for your perusal...


>From: Bruce Momjian <[EMAIL PROTECTED]>
>Subject: Re: [SQL] remove line type?
>To: mikeo <[EMAIL PROTECTED]>
>Date: Tue, 30 May 2000 10:48:02 -0400 (EDT)
>
>That is very strange.  I would send it to the mailing lists.
>
>> hi bruce,
>>   we've run into a problem after having deleted the line type.
>> when we attempt to query a table by column which is defined as float8 
>> we get this error:
>> 
>> \d test1
>>            Table "test1"
>>  Attribute |    Type     | Modifier
>> -----------+-------------+----------
>>  tfap_id   | float8      |
>>  tfap_name | varchar(50) |
>>  groupid   | integer     |
>>  groupdesc | varchar(50) |
>>  switch    | varchar(50) |
>> 
>> select * from test1 where tfap_id = 49232;
>> ERROR:  Unable to locate type oid 628 in catalog
>> 
>> if the column is defined as an integer we get the desired results:
>> 
>> spectl=# \d topflow_application
>>     Table "topflow_application"
>>  Attribute |    Type     | Modifier
>> -----------+-------------+----------
>>  tfap_id   | integer     |
>>  tfap_name | varchar(50) |
>>  groupid   | integer     |
>>  groupdesc | varchar(50) |
>>  switch    | varchar(50) |
>> 
>> select * from topflow_application  where tfap_id = 049232;
>>  tfap_id |         tfap_name         | groupid |        groupdesc        |
>>   switch
>>
---------+---------------------------+---------+-------------------------+--
>> -------------
>>    49232 | xxxxxxxxxxxxxxxxxxxxxxxxx |      31 | Remote Control Services |
>> 111.111.1.111
>> 
>> now, the programmer who created test1 table made that column a float by
>> accident 
>> but that could mean trouble down the road for us as we do use float for
>> some other columns.
>> you can still select from test1 as long as you don't reference the float
>> column in the where 
>> clause.    
>> 
>> oid 628 is the oid for the line row in the pg_type table.  is there
>> something else that we 
>> need to do or is deleting this type not a good idea after all?  
>> 
>> thanks,
>>     mikeo
>> 
>> 
>> 
>> 
>> At 03:04 PM 5/17/00 -0400, you wrote:
>> >If you do it in template1 database after initdb, all new databases will
>> >not have that type either.
>> >
>> >> that worked!!!  thanks!
>> >> 
>> >> mikeo
>> >> 
>> >> 
>> >> At 02:51 PM 5/17/00 -0400, Bruce Momjian wrote:
>> >> >I guess you could remove the line type from the pg_type table and
see if
>> >> >that helps.
>> >> >
>> >> >> hi,
>> >> >>   we're looking at migrating from ORACLE to postgres in the
>> >> >> very near future and we've run into a small problem.  there's
>> >> >> a data type defined "LINE".  we have named one of our tables 
>> >> >> as "LINE" also and it would require a great deal of code 
>> >> >> changes to rename that table.  is it possible to simply
>> >> >> "turn off" the line type?  any help is appreciated.
>> >> >> 
>> >> >> thanks,
>> >> >>    mikeo 
>> 
>> 
>
>
>-- 
>  Bruce Momjian                        |  http://www.op.net/~candle
>  [EMAIL PROTECTED]               |  (610) 853-3000
>  +  If your life is a hard drive,     |  830 Blythe Avenue
>  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>

Reply via email to