pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: the6campbells <the6campbells@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types
Date: Tue, 02 Oct 2012 22:31:56 +0800
Message-ID: <506AFADC.3040405@ringerc.id.au> (raw)
In-Reply-To: <CAFEjsq5pXqzNkkymwTanz8-Hny8i_uUQVSs2WoC02vEKJW0cZA@mail.gmail.com>
References: <CAFEjsq5pXqzNkkymwTanz8-Hny8i_uUQVSs2WoC02vEKJW0cZA@mail.gmail.com>

On 09/24/2012 11:12 PM, the6campbells wrote:
> The result set returned from DatabaseMetadata.getTypeInfo contains many
> rows for instance it returns entries for tables and views in schemas.

Everything is in a schema; if you don't specify a schema you just get 
the schema "public" by default.

> This seems inconsistent with the 'spirit' of what this method is
> intended to facilitiate.

It lists all the types. Seems sensible to me. If you want to filter by 
schema, you filter by schema.

Should types in pg_catalog.* be hidden? If so, what if an extension adds 
new types? Should they be listed? What if the *same* extension is 
instead installed into the public schema - should its types be visible, 
or hidden? What about a type created in `pg_temp`?

It's just too messy with an extensible database like PostgreSQL. Without 
a very strong justification based on the JDBC spec for excluding system 
types (and how would we even define "system type"?) I'm strongly against 
changing the current behaviour.

--
Craig Ringer




view thread (2+ messages)

Message-ID: <506AFADC.3040405@ringerc.id.au>
Permalink:  ../506AFADC.3040405@ringerc.id.au/
Also on:    postgresql.org/message-id/506AFADC.3040405@ringerc.id.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: ringerc@ringerc.id.au, the6campbells@gmail.com
  Subject: Re: DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types
  In-Reply-To: <506AFADC.3040405@ringerc.id.au>
  References: <CAFEjsq5pXqzNkkymwTanz8-Hny8i_uUQVSs2WoC02vEKJW0cZA@mail.gmail.com> <506AFADC.3040405@ringerc.id.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox