Search Postgresql Archives

Re: Question about accessing partitions whose name includes the schema name and a period - is this correct?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 20/04/2023 00:50 CEST Jay Stanley <beansboy@xxxxxxxxxx> wrote:
>
> postgres=# alter table my_schema.my_table drop partition "my_schema"."my_schema.my_table_should_not_work";
> ERROR: syntax error at or near ""my_schema""
> LINE 1: alter table my_schema.my_table drop partition "my_schema"."m...
>                                                        ^
> -or-
> postgres=# alter table my_schema.my_table drop partition my_schema."my_schema.my_table_should_not_work";
> ERROR: syntax error at or near "my_schema"
> LINE 1: alter table my_schema.my_table drop partition my_schema."my_...

The command you're looking for is ALTER TABLE DETACH PARTITION.

DROP PARTITION means dropping the column named "partition".  The syntax error
comes from the parser expecting an optional CASCADE or RESTRICT after DROP PARTITION.

--
Erik





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux