Re: Enabling SQL text field in the SQL tab of object dialog

From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Guillaume Lelarge" <guillaume(at)lelarge(dot)info>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Enabling SQL text field in the SQL tab of object dialog
Date: 2008-06-16 20:11:42
Message-ID: 937d27e10806161311n63ade00fq160fe588525b67f0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Mon, Jun 16, 2008 at 8:58 PM, Guillaume Lelarge
<guillaume(at)lelarge(dot)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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2008-06-16 20:12:58 Re: Enabling SQL text field in the SQL tab of object dialog
Previous Message Guillaume Lelarge 2008-06-16 20:03:37 Re: A fix and a new functionnality for the colour patch