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);
(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);
(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 | |
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 | |
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