Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps7YR-0004SL-F6 for pgsql-general@arkaria.postgresql.org; Thu, 27 Apr 2023 19:45:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps7YP-0001OH-Cp for pgsql-general@arkaria.postgresql.org; Thu, 27 Apr 2023 19:45:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps7YP-0001O8-27 for pgsql-general@lists.postgresql.org; Thu, 27 Apr 2023 19:45:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps7YL-005RGk-Ue for pgsql-general@lists.postgresql.org; Thu, 27 Apr 2023 19:45:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 33RJjFqK1205677; Thu, 27 Apr 2023 15:45:15 -0400 From: Tom Lane To: Michael Xu cc: pgsql-general@lists.postgresql.org Subject: Re: Postgres query doesn't accept double quote around schema name in query statement In-reply-to: References: Comments: In-reply-to Michael Xu message dated "Thu, 27 Apr 2023 12:40:12 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1205675.1682624715.1@sss.pgh.pa.us> Date: Thu, 27 Apr 2023 15:45:15 -0400 Message-ID: <1205676.1682624715@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Xu writes: > By default, pgsql accepts double quotes around schema's name in a query, > e.g. select * from "ads"."MyTableName". In our env, it throws > 42P01:relation "ads.MyTableName" does not exist. Works for me: regression=# create schema ads; CREATE SCHEMA regression=# create table "ads"."MyTableName" (f1 int); CREATE TABLE regression=# select * from "ads"."MyTableName"; f1 ---- (0 rows) I'm wondering a bit about invisible white space in your schema name; but without a self-contained test case we can do no more than guess. regards, tom lane