X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 766C4D1B266 for ; Tue, 18 May 2004 09:19:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 75273-05 for ; Tue, 18 May 2004 09:19:01 -0300 (ADT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 7E607D1CA49 for ; Tue, 18 May 2004 09:18:57 -0300 (ADT) Received: (qmail 23456 invoked from network); 18 May 2004 12:18:58 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 18 May 2004 12:18:58 -0000 Subject: Re: patch for getUDT From: Dave Cramer Reply-To: pg@fastcrypt.com To: Kris Jurka Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: References: <40A379EB.1080106@hugsmidjan.is> <1084460311.22930.15.camel@localhost.localdomain> <1084836296.22930.102.camel@localhost.localdomain> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1084882736.29453.134.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 18 May 2004 08:18:56 -0400 Content-Transfer-Encoding: 7bit X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/112 X-Sequence-Number: 10122 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 > > > > !DSPAM:40a956df25291752513779! > > -- Dave Cramer 519 939 0336 ICQ # 14675561