Search Postgresql Archives

Re: scripts in Postgres

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

 



postgresql@xxxxxxxxxxxx ("Craig Bryden") wrote in
001601c54f15$b9d32fe0$0200a8c0@amd2800:">news:001601c54f15$b9d32fe0$0200a8c0@amd2800: 

> Hi Sean
> 
> Thanks for that. Does psql work differently to pgAmin III's Query
> program? I have tried exactly what you showed me below, and it did not
> work. It seems like the script stops on first error, and the first
> error is that the table does not exist.
> 

Could it be that it pgAdmin creates a transaction.
What happens if you set in some begin and commit.
(Just a wild suggestion, not tested in any way).
----------------------------------------
begin;
DROP TABLE tb_messages;
commit;
begin;
CREATE TABLE tb_messages (
....
);
commit;

-- 
Rolf

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

[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