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

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?
Date: 2012-06-27 13:35:52
Message-ID: 1340804152.50456.YahooMailNeo@web171403.mail.ir2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


>________________________________
> From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>To: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
>Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
>Sent: Wednesday, 27 June 2012, 14:31
>Subject: Re: [GENERAL] Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?
>
>Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk> writes:
>> 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) .
>
>General case: the schema name is used if the type wouldn't be found
>without it, according to your current search_path.
>
>There are some specific built-in types for which schema names are
>never used, because their names are actually keywords according to SQL
>(which a fortiori means there's no ambiguity on the lookup side).
>

However none of that explains why one of the types is returned with the schema name and the other is not, both are in the same schema which is in the current search_path.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-06-27 14:03:47 Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?
Previous Message Tom Lane 2012-06-27 13:31:21 Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?