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

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>
Subject: Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?
Date: 2012-06-27 13:31:21
Message-ID: 28884.1340803881@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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).

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2012-06-27 13:35:52 Re: Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?
Previous Message Glyn Astill 2012-06-27 09:47:48 Type Name / Internal name returned by pg_catalog.format_type with/without prepended schema name?