Re: How to reference a DB with a period in its name ?

From: Christophe Pettus <xof(at)thebuild(dot)com>
To: David Gauthier <dfgpostgres(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to reference a DB with a period in its name ?
Date: 2024-03-29 21:24:12
Message-ID: BD791A49-083D-4082-BB6E-D2EAA54087D7@thebuild.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> On Mar 29, 2024, at 14:16, David Gauthier <dfgpostgres(at)gmail(dot)com> wrote

> I tried encapsulating the DB name in double quotes (no good), single quotes (still no good) escaping with '\' (no good), escaping with ".." (no good).

This is probably more about the string handling in the API you are using than PostgreSQL per se, because enclosing the individual components in double quotes does indeed work:

x.y=# select * from "x.y".s.t;
i
---
(0 rows)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jason Long 2024-03-29 21:35:22 PostgreSQL hardening best practice
Previous Message David G. Johnston 2024-03-29 21:21:35 Re: How to reference a DB with a period in its name ?