How do I quit in the middle of a SQL script?

From: Wei Weng <wweng(at)kencast(dot)com>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: How do I quit in the middle of a SQL script?
Date: 2005-05-20 17:22:42
Message-ID: 428E1CE2.2050605@kencast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Say if I want to add a small snip of code in front of the sql script
generated by the pg_dump, to check for something then if the condition
doesn't match, the script terminates right away. (Without actually doing the
restoring stuff that the following large chunk is supposed to do)

Can I do that? And is it a good idea to add arbitrary code to the database
dump sql script?

Thanks!

Wei

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Andrew Hammond 2005-05-20 17:54:35 Re: Transaction in plpgslq
Previous Message Rafa Couto 2005-05-20 10:47:31 Transaction in plpgslq