Re: [SQL] remove line type?

From: mikeo <mikeo(at)spectrumtelecorp(dot)com>
To: pgsql-sql(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [SQL] remove line type?
Date: 2000-05-30 15:35:04
Message-ID: 3.0.1.32.20000530113504.009563b0@pop.spectrumtelecorp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

for your perusal...

>From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
>Subject: Re: [SQL] remove line type?
>To: mikeo <mikeo(at)spectrumtelecorp(dot)com>
>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
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bradley Kieser 2000-05-30 16:00:39 Can not guess your host type
Previous Message jpnoirault 2000-05-30 15:26:13 Where is EARP ?

Browse pgsql-sql by date

  From Date Subject
Next Message p.lam 2000-05-30 16:36:34 Pg/PLSQL Errors!!
Previous Message Tom Lane 2000-05-30 14:44:59 Re: 7.0 weirdness