Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TJ3W1-00067p-UG for pgsql-jdbc@postgresql.org; Tue, 02 Oct 2012 14:32:06 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TJ3Vz-00020W-BG for pgsql-jdbc@postgresql.org; Tue, 02 Oct 2012 14:32:04 +0000 Received: by padhz1 with SMTP id hz1so5287351pad.19 for ; Tue, 02 Oct 2012 07:32:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=Bf2lF3WnyvChclbsPgOGdCo/2isr3UWl+q216R7mvO0=; b=bOa6hEnxmxdnas4ltSaYUzvQSzAvcIAM406dzrWPtOub+sL2xbWkTQ7k+1Vo8jYrcL lUhuAZ7sYMECNu1bSPT80hcp5pP4SkWm0MSMfVhPGtIkdhJjq4x+xetZxz0quFRm3sQO iUmprkt0jCSIY7Gi1kAJn+T9iaNmwoclMUWxqymHhIdiZUnWLUBQlR8Q+U5kbPzrxFK3 dEn8pfk7afC6IF4/Vx5Lj/zcGX8QrXQ8+AggCtKn6m4dSLGRxO1w6a+z5Wj8Xi6xora7 pnUMOzRaFeVBnw2pA2+2UkKsTh1FViwucCP7kza+ruaqQEq6NSEPBhcelYMiKxmkoFoH /wjA== Received: by 10.66.85.10 with SMTP id d10mr19985449paz.52.1349188322199; Tue, 02 Oct 2012 07:32:02 -0700 (PDT) Received: from ayaki.localdomain (office1.postnewspapers.com.au. [150.101.171.128]) by mx.google.com with ESMTPS id w10sm805082paz.22.2012.10.02.07.31.59 (version=SSLv3 cipher=OTHER); Tue, 02 Oct 2012 07:32:01 -0700 (PDT) Message-ID: <506AFADC.3040405@ringerc.id.au> Date: Tue, 02 Oct 2012 22:31:56 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: the6campbells CC: pgsql-jdbc@postgresql.org Subject: Re: DatabaseMetadata.getTypeInfo resultset returns more than just Postgres/user defined data types References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlGDOs7RM96GObDnbsuozTO8oR6OkxWLw/6U6FfJjDGe1DbIfcFqU62bwp8j8IdfxVa6jRL X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201210/7 X-Sequence-Number: 23331 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