Subject: How to escape string in Postgres?

From: Igor Korot <[email-masked]>
Date: Sat, 28 Mar 2026 23:08:17 -0700

Hi,

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 []?

Thank you.

---

From: Laurenz Albe <[email-masked]>
Date: Sun, 29 Mar 2026 08:56:04 +0200

> What do I use in Postgres instead of []?

Normally, you read the documentation.

Yours,
Laurenz Albe

---

From: Igor Korot <[email-masked]>
Date: Sun, 29 Mar 2026 00:21:26 -0700

Hi, Lauren’s,

> Normally, you read the documentation.

Agreed.
However trying to google on “Postgres escaping query” didnt produce any
links to the docs.

Thx.

---

From: Pavel Stehule <[email-masked]>
Date: Sun, 29 Mar 2026 10:00:08 +0200

Hi

> However trying to google on “Postgres escaping query” didnt produce any

generally, your question is not related to escaping

https://www.postgresql.org/docs/18/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS

Regards

Pavel