From: Paul Förster <paul.foerster@gmail.com>
To: Marc Millas <marc.millas@mokadb.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: table name
Date: Thu, 11 Jun 2020 20:58:49 +0200
Message-ID: <75D93B48-9BBC-41C9-A1F8-CB1142F0A031@gmail.com> (raw)
In-Reply-To: <CADX_1aaMDjae0L_MHbfUhnqYnUZCFVFaEZdUSGNr1o0JK4hN3A@mail.gmail.com>
References: <CADX_1aaMDjae0L_MHbfUhnqYnUZCFVFaEZdUSGNr1o0JK4hN3A@mail.gmail.com>
Hi Marc,
> On 11. Jun, 2020, at 20:54, Marc Millas <marc.millas@mokadb.com> wrote:
> sorry if my question is tooo simple :-)
it's not. :-)
> obviously if I ask:
> select * from regions-20180101;
> I get a syntax error.
> if I try select * from $$regions_20180101$$;
> I get another syntax error.
> If I try to rename that table, same thing.
> if I try a cte, same thing.
>
> What should I do ?
you can just quote its name:
select * from "regions-20180101";
Cheers,
Paul
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: paul.foerster@gmail.com, marc.millas@mokadb.com
Subject: Re: table name
In-Reply-To: <75D93B48-9BBC-41C9-A1F8-CB1142F0A031@gmail.com>
References: <CADX_1aaMDjae0L_MHbfUhnqYnUZCFVFaEZdUSGNr1o0JK4hN3A@mail.gmail.com> <75D93B48-9BBC-41C9-A1F8-CB1142F0A031@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox