ERROR CODE

Started by Ray Albaalmost 26 years ago3 messagesgeneral
Jump to latest
#1Ray Alba
ralba@dotsperinch.com

I am creating a new table called patienttype with categories -
infant,pediatric, adult in the doctors table

for some reason it allows me to create a sequence but, when I create a
table that requires that sequence, I get the following.

create table patienttype (
id INT DEFAULT nextval ('category_seq'),
parent id INT DEFAULT '0',
type varchar(50));

Here is the error? What is that all about?
ERROR: Unable to locate type name 'id' in catalog

Thanks,

Ray

---------------------------------
* *** *
* Ray Alba/ dotsperinch *
* 74 Varick | 55 W 92nd St. *
* 212.966.4979 | 212.864.6456 *
* Fax.966.3866 | 212.864.4489 *
* ralba@dotsperinch.com *
* http://www.dotsperinch.com *
* http://www.dotsperinch.com *
---------------------------------

#2Noname
davidb@vectormath.com
In reply to: Ray Alba (#1)
Re: ERROR CODE

I think it is because you have a space between "parent" and "id" in your
field named "parent id".

David Boerwinkle
-----Original Message-----
From: Ray Alba <ralba@dotsperinch.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Date: Saturday, April 29, 2000 7:17 AM
Subject: [GENERAL] ERROR CODE

Show quoted text

I am creating a new table called patienttype with categories -
infant,pediatric, adult in the doctors table

for some reason it allows me to create a sequence but, when I create a
table that requires that sequence, I get the following.

create table patienttype (
id INT DEFAULT nextval ('category_seq'),
parent id INT DEFAULT '0',
type varchar(50));

Here is the error? What is that all about?
ERROR: Unable to locate type name 'id' in catalog

Thanks,

Ray

---------------------------------
* *** *
* Ray Alba/ dotsperinch *
* 74 Varick | 55 W 92nd St. *
* 212.966.4979 | 212.864.6456 *
* Fax.966.3866 | 212.864.4489 *
* ralba@dotsperinch.com *
* http://www.dotsperinch.com *
* http://www.dotsperinch.com *
---------------------------------

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Ray Alba (#1)
Re: ERROR CODE

Ray Alba writes:

create table patienttype (
id INT DEFAULT nextval ('category_seq'),
parent id INT DEFAULT '0',

^^^^^^^^^
The system interprets this as field name `parent', datatype `id'. You need
to double quote the field name if you want spaces in it.

type varchar(50));

Here is the error? What is that all about?
ERROR: Unable to locate type name 'id' in catalog

It means there is no datatype 'id'.

--
Peter Eisentraut Sernanders v�g 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden