Re: contrib/dblink GRANTs and regression test fix - Mailing list pgsql-patches

From Tom Lane
Subject Re: contrib/dblink GRANTs and regression test fix
Date
Msg-id 18805.1032040163@sss.pgh.pa.us
Whole thread Raw
In response to Re: contrib/dblink GRANTs and regression test fix  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Joe Conway <mail@joeconway.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

pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: contrib/dblink GRANTs and regression test fix
Next
From: Joe Conway
Date:
Subject: Re: contrib/dblink GRANTs and regression test fix