Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?

Поиск
Список
Период
Сортировка
От Glyn Astill
Тема Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?
Дата
Msg-id 1340790468.11679.YahooMailNeo@web171401.mail.ir2.yahoo.com
обсуждение исходный текст
Ответы Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi Guys,

I was wondering if anyone could shed some light with type names returned by pg_catalog.format_type sometimes having the schema name prepended, and sometimes not? I'm calling it like format_type(pg_type.oid, NULL) .

I'm using pg9.0, but I remember seeing this years ago on older versions too - I just can't remember what I did about it.

I've got two types that appear to have been created in the same way, except that pg_catalog.format_type returns the schema name for one, but not the other.  I can't reproduce this just by running the sql used to create the types now though.

CREATE TYPE website.block_selection AS
   (block character varying,
    description character varying,
    amount numeric,
    "left" integer,
    best integer,
    type integer,
    singles_only boolean);

CREATE TYPE website.buy_with_detail AS
   (price numeric,
    must_buy_with integer[],
    limit_type text,
    multiplier integer);

SEE=# \dT+ website.block_selection
                              List of data types
 Schema  |      Name       |  Internal name  | Size  | Elements | Description
---------+-----------------+-----------------+-------+----------+-------------
 website | block_selection | block_selection | tuple |          |


SEE=# \dT+ website.buy_with_detail
                                  List of data types
 Schema  |          Name           |  Internal name  | Size  | Elements | Description
---------+-------------------------+-----------------+-------+----------+-------------
 website | website.buy_with_detail | buy_with_detail | tuple |          |


Any ideas how this could have come about? All the types were created on 9.0, and I've tried with and without the website schema in the search path etc, but I'm sure I'm just missing something simple?

Thanks
Glyn




В списке pgsql-general по дате отправления:

Предыдущее
От: Cody Cutrer
Дата:
Сообщение: Re: Initing a new replica
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?