pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types
2+ messages / 2 participants
[nested] [flat]

* DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types
@ 2012-09-24 15:12  the6campbells <the6campbells@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: the6campbells @ 2012-09-24 15:12 UTC (permalink / raw)
  To: pgsql-jdbc

The result set returned from DatabaseMetadata.getTypeInfo contains many
rows for instance it returns entries for tables and views in schemas.

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

Is this a known Postgres JDBC driver bug?

http://docs.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getTypeInfo
()

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types
@ 2012-10-02 14:31  Craig Ringer <ringerc@ringerc.id.au>
  parent: the6campbells <the6campbells@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Craig Ringer @ 2012-10-02 14:31 UTC (permalink / raw)
  To: the6campbells <the6campbells@gmail.com>; +Cc: pgsql-jdbc

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2012-10-02 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24 15:12 DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types the6campbells <the6campbells@gmail.com>
2012-10-02 14:31 ` Craig Ringer <ringerc@ringerc.id.au>

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