Skip site navigation (1) Skip section navigation (2)

Re: contrib/dblink GRANTs and regression test fix

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: contrib/dblink GRANTs and regression test fix
Date: 2002-09-14 21:49:23
Message-ID: 18805.1032040163@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Joe Conway <mail(at)joeconway(dot)com> writes:
> What do you think about a plpgsql function to check for the existence
> of database "regression_slave", and drop it conditionally -- run at
> the beginning of the script in place of DROP DATABASE?

Okay by me.

> p.s. BTW, I think this is a good example why an IF construct supported by the
> main grammer would be nice. Something like:
>      IF (expression) {statements};
> or something similar would allow conditional dropping of objects if they 
> exist, but no ERROR if they didn't. Possible 7.4 TODO?

Before we could move such a thing into the main grammar I'd want to
think hard about the concurrency implications.  For the regression tests
we need not sweat about two backends dropping "regression_slave" at
about the same time ... but if it's going to be a mainstream supported
feature then I don't think we can ignore those issues.

			regards, tom lane

In response to

pgsql-patches by date

Next:From: Tom LaneDate: 2002-09-14 22:02:02
Subject: Re: contrib/dblink GRANTs and regression test fix
Previous:From: Joe ConwayDate: 2002-09-14 21:48:48
Subject: Re: contrib/dblink GRANTs and regression test fix

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group