On Mon, Jun 16, 2008 at 8:58 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Grmbl... There's a big flaw in my patch. You're right once again.
Meh. It's happened a couple of times now :-)
> Problem is, pgAdmin divide the queries to launch in two groups, only for
> some objects : database and tablespace. The SQL textfield contains the
> concatenation of the two groups. So we can't let the user change this field
> if we aren't able to separate the two groups.
>
> I think there are two possible ways to deal with this:
>
> * the simpler, but confusing, one: add another textfield, put each
> group in one textfield;
> * the difficult, but less error prone, one: prevent the user to use the
> read/write mode when he's on the database's properties (and the same
> for tablespace).
>
> I prefer the latter because it's less confusing for the user (why two SQL
> textfields?), less error prone (what happens if the user takes SQL textfield
> 1's contents and put it in SQL textfield 2?).
>
> Desactivating the read/write mode for database and tablespace doesn't seem a
> big issue to me, does it?
Hmm, I'd forgotten about that. We do it because it allows us to run
non-transaction safe DDL in separate transactions (which is required
in 8.3). Actually, this is not a major issue - all that will happen is
that the server will reject the SQL in 8.3+ if the user includes no
transaction safe DDL with other commands (or blindly accept it in
earlier versions). I say we just split the text control on those two
dialogues, per option 1.
--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com