Skip site navigation (1) Skip section navigation (2)

Re: patch for getUDT #3

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: patch for getUDT #3
Date: 2004-05-19 12:44:19
Message-ID: 1084970659.22887.187.camel@localhost.localdomain (view raw or flat)
Thread:
Lists: pgsql-jdbc
Just added the check to make sure the type is not in pg_catalog schema.

Dave
On Tue, 2004-05-18 at 18:32, Dave Cramer wrote:
> Other than the hack of what do with undefined types, and one more little
> problem which is how to qualify user defined types. This is more
> difficult than first glance. It is possible to just say typowner != 1,
> but this doesn't solve the problem if I own the cluster. 
> 
> Here is round 2
> On Tue, 2004-05-18 at 08:18, Dave Cramer wrote:
> > On Mon, 2004-05-17 at 20:20, Kris Jurka wrote:
> > > On Mon, 17 May 2004, Dave Cramer wrote:
> > > 
> > > > While we don't support JAVA_OBJECT we do support struct, and distinct.
> > > 
> > > After doing some more reading I would agree that domains == distinct and
> > > complext types == struct, if that's what you're suggesting.  The patch 
> > > shows no signs of this though, it just blindly selects everything out of 
> > > pg_type.
> > 
> > Yes
> > > 
> > > To be worthy of applying it seems this patch should:
> > > 
> > > 1) Only return domains and complex types, correctly setting data_type and 
> > > base_type for domains.
> > > 
> > > 2) Use pg_description to retrieve a comment for the remarks column.
> > > 
> > > 3) Filter out toast entries by checking pg_namespace.nspname != 'pg_toast' 
> > > instead of using a like expression on type name.
> > 
> > this must remain, as there will be numerous pg_toast_... entries created
> > by large columns
> > > 
> > > 4) Use the escapeQuotes function to ensure that the schema and type 
> > > patterns don't have single quotes in them.
> > > 
> > > 5) Use the types[] parameter to filter out undesired data_type values.
> > > 
> > > 6) Use ORDER BY to return the results in the order the spec says.
> > > 
> > > 7) Use createMetaDataStatement() instead of createStatement() when 
> > > returning the query results.  This makes the produced ResultSet scrollable 
> > > instead of the default forward only behavior.
> > > 
> > > I would personally like to see a version of this that ran on a 7.2 server 
> > > because the regression tests currently pass against a 7.2 server.  It 
> > > isn't within our stated goals of supporting the past two versions of the 
> > > driver, but I think it's a reasonable thing to do.
> > 
> > This probably makes things alot more difficult as schema's don't exist
> > in 7.2 but...
> > > 
> > > Kris Jurka
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561

Attachment: UDT.patch
Description: text/x-patch (13.1 KB)

In response to

pgsql-jdbc by date

Next:From: Alban MathieuDate: 2004-05-19 13:23:58
Subject: Driver JDBC3 build 213 for postgreSQL 7.4
Previous:From: Oliver JowettDate: 2004-05-19 02:40:33
Subject: Re: v3proto Parse/Bind and the query planner

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group