Re: [GENERAL] scripts in Postgres

2005-05-03 Thread Sean Davis
On May 3, 2005, at 2:50 AM, Rolf Østvik wrote: [EMAIL PROTECTED] ("Craig Bryden") wrote in news:[EMAIL PROTECTED]: 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

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Rolf Østvik
[EMAIL PROTECTED] ("Craig Bryden") wrote in news:[EMAIL PROTECTED]: > 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 > erro

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Sean Davis
the "drop if exists" functionality. See here. http://archives.postgresql.org/pgsql-novice/2004-10/msg00158.php Sean - Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "Sean Davis" <[EMAIL PROTECTED]>; "pgsql" Sent: Monday, May 02,

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Tino Wildenhain
Am Montag, den 02.05.2005, 14:05 +0200 schrieb Craig Bryden: > Hi > > Thanks for the reply. Since I don't intend using any of the interfaces at > the moment, How would I write the script below in SQL then. > Please keep in mind that I will be sending this script to other people to > run and that i

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Craig Bryden
ssage - From: "Sean Davis" <[EMAIL PROTECTED]> To: "Craig Bryden" <[EMAIL PROTECTED]>; "pgsql" Sent: Monday, May 02, 2005 2:11 PM Subject: Re: [GENERAL] scripts in Postgres > DROP TABLE tb_messages; > CREATE TABLE tb_messages ( > > ); &g

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Sean Davis
- Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "Sean Davis" <[EMAIL PROTECTED]>; "pgsql" Sent: Monday, May 02, 2005 8:05 AM Subject: Re: [GENERAL] scripts in Postgres Hi Thanks for the reply. Since I don't intend using any of t

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Craig Bryden
ssage - From: "Sean Davis" <[EMAIL PROTECTED]> To: "Craig Bryden" <[EMAIL PROTECTED]>; "pgsql" Sent: Monday, May 02, 2005 1:57 PM Subject: Re: [GENERAL] scripts in Postgres > Yes, pl/pgsql needs to be written as a function. If you want to "

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Sean Davis
documenation is quite good, so check out: http://www.postgresql.org/docs/8.0/interactive/server-programming.html for many examples. Sean - Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "pgsql" Sent: Monday, May 02, 2005 7:21 AM Subject: [GENERAL]

[GENERAL] scripts in Postgres

2005-05-02 Thread Craig Bryden
Hi I am fairly new to Postgres and am struggling to understand one concept. If I wish to use pl/pgsql, must it be in a function? An example of where I would not want it to be in a function is: I have a CREATE TABLE statement that I want to execute. But the script must first check for the existenc