Re: table name

From: Paul Förster <paul(dot)foerster(at)gmail(dot)com>
To: Marc Millas <marc(dot)millas(at)mokadb(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: table name
Date: 2020-06-11 18:58:49
Message-ID: 75D93B48-9BBC-41C9-A1F8-CB1142F0A031@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Marc,

> On 11. Jun, 2020, at 20:54, Marc Millas <marc(dot)millas(at)mokadb(dot)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

In response to

  • table name at 2020-06-11 18:54:55 from Marc Millas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message George Dimopoulos 2020-06-11 19:32:14 ora2pg error : DBD::Oracle::db prepare failed: ORA-28110
Previous Message Marc Millas 2020-06-11 18:58:01 Re: table name