public inbox for [email protected]  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <[email protected]>
To: Igor Korot <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: How to escape string in Postgres?
Date: Sun, 29 Mar 2026 13:54:52 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+FnnTy4Zcq1YDVL0dNKsZx-wn6ncq4O-a9=ra5pN_uWg7SNRg@mail.gmail.com>
References: <CA+FnnTy4Zcq1YDVL0dNKsZx-wn6ncq4O-a9=ra5pN_uWg7SNRg@mail.gmail.com>

On Sat, Mar 28, 2026 at 11:08:17PM -0700, Igor Korot wrote:
> In MS SQL server one can write a query like so
> SELECT a, b, c FROM [catalog].[schema].[table];
> What do I use in Postgres instead of []?

Generally you put there name of schema and table.

select * from public.zzz;

if your schema/table name would contain "weird" characters, then put the
identifier inside "quotes", like:

select * from "WeirdyNamedSchema"."badly named table";

If that's not what you're after, you have to be more specific.

Best regards,

depesz







reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: How to escape string in Postgres?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox