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

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: Michael Xu <online(dot)mxu(at)gmail(dot)com>
Cc: 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:44:56
Message-ID: FA08145B-B278-45C1-956A-D41C00EB7E80@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Apr 27, 2023, at 12:40, Michael Xu <online(dot)mxu(at)gmail(dot)com> wrote:
> In our env, it throws 42P01:relation "ads.MyTableName" does not exist.

The function of double quotes in SQL is to allow you do include characters that would otherwise not be legal in an identifier (as well as making the identifier case-sensitive). So, you are telling the database that there is a table named "ads.MyTableName", with the "." included as part of the identifier.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-04-27 19:45:15 Re: Postgres query doesn't accept double quote around schema name in query statement
Previous Message Michael Xu 2023-04-27 19:40:12 Postgres query doesn't accept double quote around schema name in query statement