I've a script:
CREATE DATABASE ahop
GO
CREATE TABLE shop.dbo.TABLE1 (
);
CREATE TABLE shop.dbo.TABLEN (
);
But it doesn't seem to work in PostgreSQL. Error message: "error near GO". I dont get it, how to create scripts in Postgresql?
Replace the T-SQL batch terminator GO with the PostgreSQL batch terminator ;.
GO is not supported in postgreSQL
you need to connect on the database using \. eg,
CREATE DATABASE testdatabase;
\c testdatabase
CREATE TABLE testtable (testcolumn int);
database.schema.tablename. But this all documented in the manual.TSQL