Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a494J-00055l-NK for pgsql-jdbc@arkaria.postgresql.org; Wed, 02 Dec 2015 15:11:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a494J-0005Js-9t for pgsql-jdbc@arkaria.postgresql.org; Wed, 02 Dec 2015 15:11:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a493n-0004j6-SK for pgsql-jdbc@postgresql.org; Wed, 02 Dec 2015 15:11:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a493k-0003Bb-Ow for pgsql-jdbc@postgresql.org; Wed, 02 Dec 2015 15:11:10 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id tB2FB4TT015967; Wed, 2 Dec 2015 10:11:04 -0500 From: Tom Lane To: Kevin Wooten cc: List Subject: Re: pg_type name quotability In-reply-to: <0B141016-7180-46E4-9FCB-31ADB231DCF5@me.com> References: <0B141016-7180-46E4-9FCB-31ADB231DCF5@me.com> Comments: In-reply-to Kevin Wooten message dated "Wed, 02 Dec 2015 03:21:33 -0700" Date: Wed, 02 Dec 2015 10:11:04 -0500 Message-ID: <15966.1449069064@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Kevin Wooten writes: > Does anybody know if the name of a type/table in these system tables is guaranteed to be in a quotable format? Ran into a specific instance where the table name needs to be quoted by the driver (e.g. “user”) but want to make sure it’s always valid to quote the name from pg_type. AFAIK, locutions like quote_ident(pg_type.typname) should always work, keeping in mind the possible need to schema-qualify as well. This will often not give you what you might think is the most common name for the type, but it will parse correctly. regards, tom lane -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc