Received: from gw.spectrumtelecorp.com (216-064-054-021.inaddr.vitts.com [216.64.54.21]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA75226; Tue, 30 May 2000 11:26:58 -0400 (EDT) (envelope-from mikeo@spectrumtelecorp.com) Received: from spec34 (spec34.spectrumtelecorp.com [192.168.1.67]) by gw.spectrumtelecorp.com (8.9.3/8.8.7) with SMTP id LAA18639; Tue, 30 May 2000 11:30:36 -0400 Message-Id: <3.0.1.32.20000530113504.009563b0@pop.spectrumtelecorp.com> X-Sender: mikeo@pop.spectrumtelecorp.com X-Mailer: Windows Eudora Pro Version 3.0.1 (32) Date: Tue, 30 May 2000 11:35:04 -0400 To: pgsql-sql@postgresql.org, pgsql-general@postgresql.org From: mikeo Subject: Re: [SQL] remove line type? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Archive-Number: 200005/556 for your perusal... >From: Bruce Momjian >Subject: Re: [SQL] remove line type? >To: mikeo >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@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 >