Re: table name - Mailing list pgsql-general

From Paul Förster
Subject Re: table name
Date
Msg-id 75D93B48-9BBC-41C9-A1F8-CB1142F0A031@gmail.com
Whole thread Raw
In response to table name  (Marc Millas <marc.millas@mokadb.com>)
Responses Re: table name  (Alban Hertroys <haramrae@gmail.com>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Marc Millas
Date:
Subject: Re: table name
Next
From: George Dimopoulos
Date:
Subject: ora2pg error : DBD::Oracle::db prepare failed: ORA-28110