Search Postgresql Archives

Re: Schema Copy

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

 



Hi Sonam

If you want a copy the data do a Select * into  (newschema.table) from oldschema.table     https://www.postgresql.org/docs/9.1/sql-selectinto.html

If you want to just move the table

https://www.postgresql.org/docs/current/sql-altertable.html

Alter Table oldschema.table Set Schema  newschema

On Thu, Dec 5, 2019 at 9:31 AM Sonam Sharma <sonams1209@xxxxxxxxx> wrote:
Hi Justin,

What can be done to move the data..

On Thu, Dec 5, 2019, 7:57 PM Justin <zzzzz.graf@xxxxxxxxx> wrote:
Hi Sonam

As long as the edited sql script  has been changed from  oldschema.tables  or oldschema.functions etc...  to newschema.functions, newschema.functios etc...

This does not move  data

On Thu, Dec 5, 2019 at 5:07 AM Sonam Sharma <sonams1209@xxxxxxxxx> wrote:
Can someone please help in schema copy in same database ?

I have taken db dump of current schema and in the ddl file , I have edited it with new schema.
Will this work?

[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