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 1ps7Zk-0004Wd-DR for pgsql-general@arkaria.postgresql.org; Thu, 27 Apr 2023 19:46:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ps7Zj-0000yh-BD for pgsql-general@arkaria.postgresql.org; Thu, 27 Apr 2023 19:46:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ps7Zh-0000yY-PJ for pgsql-general@lists.postgresql.org; Thu, 27 Apr 2023 19:46:43 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ps7Ze-002EDV-FI for pgsql-general@lists.postgresql.org; Thu, 27 Apr 2023 19:46:40 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 5ACF85C010F; Thu, 27 Apr 2023 15:46:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 27 Apr 2023 15:46:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1682624796; x=1682711196; bh=cnaRKUBHyvSo+gsZnmDvh3PeUEkrjHaotO2 gvUFryhY=; b=BdpkerCHXc/a8VJO63S7fZhAJYGXlqcIUKv8U8AGNjW/7Kl9jos SYMUC2W8bxXc8XdH5Zd+ergyzS09tvN2quxMX49fYBxV0a30PnFDAd905BYAwHNz y3UHDxWWv3gIsFIbFt6K+WjVvFFrDG7z8kXvIqQLI5GOyk5HCZxOClH2P22FFYbZ 45DkIASweVB8+I2sO1z93b0+ToF0GJfpvMHtJHPjS5P5wMwFpbqU01JFVeMYtUSK 9ov6WMZTQL7fl1yVQReke/kVvpevUbUKrvTO7JWGyIdzOoi6NODI2zRDXeFtMWob 4wLKfzh+ar6wt4Czu/gtBHfx5007tq75HOA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1682624796; x= 1682711196; bh=cnaRKUBHyvSo+gsZnmDvh3PeUEkrjHaotO2gvUFryhY=; b=i XOYfdaqULYIHEGkl3SU5EfEaNko80aBfqU703+x2xqhLEBDoRedvaKTWSiHWsWqa F/CiBg+F+x8TSZ+Rna6PceBjNNlM40gQvfwslxSjeYsBduKzQaw47OuLxw+11kft B1oKDz38Y3fwm7r5pbPcTdWA8oadB8eNpUya24A8b3b/8g0fcemyZ6Uzb0rks5W6 ufMmRe4w5WzolxCL2+c/+GmmWr9MQixPj5udz4Ob9oAZlSueJ++ANHYGWawfDVPP DHIwk+bwVtRTbWxX/3gl0HLQ4DgRwcZ8if5BjdVmLPL5kMAEQ5iCCxwthb/rlAMw 7ZM/MOxCTGMGe2ciPBmMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeduiedgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfuffvfhfhjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpefgiedufe etveegveelieehudetveeljeduhfehgfdvvdeiiedtgffhleeiueeuteenucffohhmrghi nhepshhtrggtkhhovhgvrhhflhhofidrtghomhenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghv vghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Apr 2023 15:46:35 -0400 (EDT) Message-ID: Date: Thu, 27 Apr 2023 12:46:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: Postgres query doesn't accept double quote around schema name in query statement To: Michael Xu , pgsql-general@lists.postgresql.org References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/27/23 12:40, Michael Xu wrote: > Hi, > > 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. It is okay if no double > quote around schema name, select * from ads."MyTableName". > > Is there settings in pssql server or db level to change it back to its > default to allow double quotes around schema. To repeat what I asked on SO: https://stackoverflow.com/questions/76123696/postgres-double-quote-around-schema-name-cause-42p01relation-schemana-tablen Works here. 1) Are you sure whatever client you are using is not doing "ads.MyTableName"? 2) Not sure if this is a copy and paste thing but the quotes look like typographical quotes, not straight quotes. > > We're using PostgreSQL 13.7 on x86_64-pc-linux-gnu, compiled by gcc > (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit > > > Thanks! > > > Michael > > -- Adrian Klaver adrian.klaver@aklaver.com