Re: Postgres query doesn't accept double quote around schema name in query statement

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Michael Xu <online(dot)mxu(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Postgres query doesn't accept double quote around schema name in query statement
Date: 2023-04-27 19:46:35
Message-ID: a8acca6d-3e8d-afa8-0093-e8092ce840d0@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2023-04-27 21:02:01 Re: Postgres query doesn't accept double quote around schema name in query statement
Previous Message Tom Lane 2023-04-27 19:45:15 Re: Postgres query doesn't accept double quote around schema name in query statement