Обсуждение: Unable to locate type name '? in catalog ERROR

Поиск
Список
Период
Сортировка

Unable to locate type name '? in catalog ERROR

От
Joel Rodrigues
Дата:
Hello,

Anyone know why trying to create this column :

"gender    CHAR(1)      CHECK (gender IN ('M','F'))"

Results in this error:

ERROR:  Unable to locate type name '? in catalog


It appears on:
<http://www.ca.postgresql.org/docs/aw_pgsql_book/node132.html>

Cheers,
Joel



Re: Unable to locate type name '? in catalog ERROR

От
Tom Lane
Дата:
Joel Rodrigues <borgempath@Phreaker.net> writes:
> Anyone know why trying to create this column :
> "gender    CHAR(1)      CHECK (gender IN ('M','F'))"
> Results in this error:

> ERROR:  Unable to locate type name '? in catalog

Works for me.  You might try turning on query logging and looking
in the postmaster log to see what query is really getting received
by the backend.  I suspect something is helpfully trying to translate
your query text :-(.  It might or might not be relevant that all the
spaces in your example showed up as \240 here...

            regards, tom lane

Re: Unable to locate type name '? in catalog ERROR

От
Joel Rodrigues
Дата:
On Saturday, September 7, 2002, at 07:36 , Joel Rodrigues wrote:

> Hello,
>
> Anyone know why trying to create this column :
>
> "gender    CHAR(1)      CHECK (gender IN ('M','F'))"
>
> Results in this error:
>
> ERROR:  Unable to locate type name '? in catalog
>
>
> It appears on:
> <http://www.ca.postgresql.org/docs/aw_pgsql_book/node132.html>
>

Well, I drop the database and started from scratch, this time
creating a table with
"sex    CHAR(1)      CHECK (sex IN ('M','F'))" first. Worked
fine. But I'd still like to know what the heck "Unable to locate
type name '? in catalog" meant.

Cheers,
- Joel