How to add partitions to the existing table in PostgreSQL

From: Naveen Kumar <naveenmcp(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: How to add partitions to the existing table in PostgreSQL
Date: 2020-10-06 06:31:02
Message-ID: CAN+uLsHX4mQq3m5Ev8szQQwU4gxijMMoO8XDAubm0GdmEKEdsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

How to add partitions to the existing table in PostgreSQL

for ex, below is my table definition:

CREATE TABLE ot.employee
(
empno smallint NOT NULL,
ename character varying(20),
job character varying(20),
deptno smallint
)

Now I would like to add partition to deptno column

I don't see any alter table command to add the partition to the existing
table.

Please help me on this.

Thank you
Naveen

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Paul Förster 2020-10-06 06:40:20 Re: How to return multiple rows by stored procedure in postgresql
Previous Message Naveen Kumar 2020-10-06 06:15:23 Re: How to return multiple rows by stored procedure in postgresql