Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B50DD9FB804 for ; Thu, 15 Feb 2007 23:33:04 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 15322-08 for ; Thu, 15 Feb 2007 23:33:01 -0400 (AST) X-Greylist: delayed 00:24:45.885575 by SQLgrey-1.7.4 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with ESMTP id D6C1C9FB73A for ; Thu, 15 Feb 2007 23:33:01 -0400 (AST) Received: from [192.168.7.181] (71-208-177-204.hlrn.qwest.net [71.208.177.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail63.csoft.net (Postfix) with ESMTP id 6ABE4F259; Thu, 15 Feb 2007 22:08:14 -0500 (EST) Message-ID: <45D5202A.5020000@ejurka.com> Date: Thu, 15 Feb 2007 20:08:26 -0700 From: Kris Jurka User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Ken Johanson CC: pgsql-jdbc@postgresql.org Subject: Re: Synthesize support for Statement.getGeneratedKeys()? References: <4580E681.3080106@kensystem.com> <45B9A9D6.2080100@kensystem.com> <45BECBA1.8080508@kensystem.com> <45D24BF2.6010405@kensystem.com> <45D3D9FA.4070509@kensystem.com> In-Reply-To: <45D3D9FA.4070509@kensystem.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50 X-Spam-Level: X-Archive-Number: 200702/76 X-Sequence-Number: 16632 Ken Johanson wrote: > Do you know what built-in method I can choose to determine what > identifiers need quoting? > There isn't one, but I was thinking about it some more and I think we might want to quote everything. Otherwise we won't be able to distinguish between columns that are created with quotes and those without. Consider a table like: CREATE TABLE tab(a int, "A" int); Without parsing the query and doing some metadata lookups we won't know what the columns are. I'd rather not try to do this and the behavior matches our existing handling of DatabaseMetaData methods. Although we might get some complaints, I'm OK with it. Right now the only place we quote identifiers in jdbc3/PSQLSavepoint#getPGName. I would suggest creating a method in org.postgresql.core.Utils named appendEscapedIdentifier that works like appendEscapedString and using it in both places.