0

My query:

create table schema1.new_table (like schema2.some table);

gives an error.

Is this due to version 8.1?

Is it possible to use two different schemas while creating table?

  • 1
    And what exactly _is_ the error? Btw: 8.1 is old, unsupported, deprecated and no longer maintained. You should ***really*** upgrade to an up-to-date version (9.x) –  Jun 24 '15 at 07:41
  • I can't upgrade version because my Linux veraion is also older. – angel Peter Jun 24 '15 at 08:00
  • 1
    PostgreSQL version is unrelated to your Linux version, you can always upgrade if you want. Version 8.1 is unsupported since November 2010 and has many serious problems that are not fixed. Do yourself a favor and upgrade to a recent version. – Frank Heikens Jun 24 '15 at 08:03
  • Again: what is the error message? –  Jun 24 '15 at 08:14
  • Okay. I will try to upgrade version. But currently I need workaround for this query. – angel Peter Jun 24 '15 at 08:45
  • So: ***what is the error you get***? –  Jun 24 '15 at 09:07
  • Syntax error near '(' opening bracket. – angel Peter Jun 24 '15 at 09:51

1 Answers1

0

Simple typo (spot the underscore)?

create table schema1.new_table (like schema2.some_table);

And you probably want to do this including defaults.

Patrick
  • 29,357
  • 6
  • 62
  • 90