Search Postgresql Archives

Re: rename table between schema with one command

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

 



On Wednesday, July 24, 2019, Alex <zhihui.fan1213@xxxxxxxxx> wrote:
for example we have table t1 under schema s1.  can I rename it to s2.t2 with one command.

currently I can do:

alter table s1.t1 set schema s2;
alter table s2.t1 rename to t2. 

No.  AFAIK alter table is the obly sql command that can do those things and the syntax does not provide a way to combine the two into a single executable command.

Out of curosity, why do you ask?

David J.


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux