Re: scripts in Postgres

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: "Rolf Østvik" <rolfostvikjobb(at)yahoo(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: scripts in Postgres
Date: 2005-05-03 09:59:02
Message-ID: 1cdc521a123b8aa907b51b79df3ef46e@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On May 3, 2005, at 2:50 AM, Rolf Østvik wrote:

> postgresql(at)bryden(dot)co(dot)za ("Craig Bryden") wrote in
> news:001601c54f15$b9d32fe0$0200a8c0(at)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;

That was my suspicion, also. I haven't tried to confirm it, though.
(I'm a MacOS user.)

Sean

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Margusja 2005-05-03 10:41:06 query is wery slow with _t() function
Previous Message Richard Huxton 2005-05-03 08:12:50 Re: Tuning queries inside a function