Thread: Query favourite comment

Query favourite comment

From
Andreas Pflug
Date:
After quite a while, I finally found the time to package a win32
snapshot. Some comments:

1) apparently, we need two iconv dlls now: iconv.dll for xml2 and
libiconv-2.dll for libpq. Hm...

2) When adding a favourite, the whole buffer is taken, not just the
marked area. This differs from the usual pgadmin behaviour (except "save
as").

3) I would have expected more than just a "multiple clipboard" function.
Why isn't the query executed immediately? Why does it replace the buffer
completely? Why not just executing it, or insert at current selection?

2) and 3) mean no real advantage over distinct sql files (actually: less
function, because once stored, a favourite can't be edited any more), to
the expense of additional dependencies.


Regards,
Andreas

Re: Query favourite comment

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Andreas Pflug
> Sent: 13 February 2006 13:52
> To: Magnus Hagander
> Cc: pgadmin-hackers
> Subject: [pgadmin-hackers] Query favourite comment
>
> After quite a while, I finally found the time to package a win32
> snapshot. Some comments:
>
> 1) apparently, we need two iconv dlls now: iconv.dll for xml2 and
> libiconv-2.dll for libpq. Hm...

I suspect we can get down to one by compiling libxml2 ourselves, however
that would probably make building pgAdmin far more difficult. Lesser of
two evils 'n' all that...

> 2) When adding a favourite, the whole buffer is taken, not just the
> marked area. This differs from the usual pgadmin behaviour
> (except "save
> as").

Yes, that seems a sensible change to make.

> 3) I would have expected more than just a "multiple
> clipboard" function.
> Why isn't the query executed immediately? Why does it replace
> the buffer
> completely? Why not just executing it, or insert at current selection?

I don't think executing immediately is ever likely to be the best idea.
As for the replace vs. insert issue, when I tested it it asked me if I
wanted to replace the query and gave me yes/no/cancel options, with No
doing an insert.

Regards, Dave.

Re: Query favourite comment

From
"Magnus Hagander"
Date:
> > After quite a while, I finally found the time to package a win32
> > snapshot. Some comments:
> >
> > 1) apparently, we need two iconv dlls now: iconv.dll for xml2 and
> > libiconv-2.dll for libpq. Hm...
>
> I suspect we can get down to one by compiling libxml2
> ourselves, however that would probably make building pgAdmin
> far more difficult. Lesser of two evils 'n' all that...

Can we link iconv statically? (That's what I did for my tests, that's
probably why I didn't notice it)


> > 2) When adding a favourite, the whole buffer is taken, not just the
> > marked area. This differs from the usual pgadmin behaviour (except
> > "save as").
>
> Yes, that seems a sensible change to make.

Hmm. Yeah.


> > 3) I would have expected more than just a "multiple clipboard"
> > function.
> > Why isn't the query executed immediately? Why does it replace the
> > buffer completely? Why not just executing it, or insert at current
> > selection?
>
> I don't think executing immediately is ever likely to be the
> best idea.

Definitly agreed. I use it to paste queries with placeholders quite
often.


> As for the replace vs. insert issue, when I tested it it
> asked me if I wanted to replace the query and gave me
> yes/no/cancel options, with No doing an insert.

That's what it's supposed to do. If it doesn't, then something is weird.

//Magnus

Re: Query favourite comment

From
Andreas Pflug
Date:
Magnus Hagander wrote:
> Can we link iconv statically? (That's what I did for my tests, that's
> probably why I didn't notice it)

I'm a friend of static linkage, esp. if only a small fraction of a dll's
functions are used.

>>As for the replace vs. insert issue, when I tested it it
>>asked me if I wanted to replace the query and gave me
>>yes/no/cancel options, with No doing an insert.
>
>
> That's what it's supposed to do. If it doesn't, then something is weird.

Which makes me complain about those message boxes, forgot this in my
prev mail. I see quite a lot of them popping up when using favourites.
In general, I find "do you want to do that" msg boxes very annoying.

Regards,
Andreas

Re: Query favourite comment

From
"Dave Page"
Date:

> -----Original Message-----
> From: Magnus Hagander [mailto:mha@sollentuna.net]
> Sent: 13 February 2006 14:01
> To: Dave Page; Andreas Pflug
> Cc: pgadmin-hackers
> Subject: RE: [pgadmin-hackers] Query favourite comment
>
> > > After quite a while, I finally found the time to package a win32
> > > snapshot. Some comments:
> > >
> > > 1) apparently, we need two iconv dlls now: iconv.dll for xml2 and
> > > libiconv-2.dll for libpq. Hm...
> >
> > I suspect we can get down to one by compiling libxml2
> > ourselves, however that would probably make building pgAdmin
> > far more difficult. Lesser of two evils 'n' all that...
>
> Can we link iconv statically? (That's what I did for my tests, that's
> probably why I didn't notice it)

LGPL...

/D

Re: Query favourite comment

From
Andreas Pflug
Date:
Dave Page wrote:
>
>
>
>>-----Original Message-----
>>From: Magnus Hagander [mailto:mha@sollentuna.net]
>>Sent: 13 February 2006 14:01
>>To: Dave Page; Andreas Pflug
>>Cc: pgadmin-hackers
>>Subject: RE: [pgadmin-hackers] Query favourite comment
>>
>>
>>>>After quite a while, I finally found the time to package a win32
>>>>snapshot. Some comments:
>>>>
>>>>1) apparently, we need two iconv dlls now: iconv.dll for xml2 and
>>>>libiconv-2.dll for libpq. Hm...
>>>
>>>I suspect we can get down to one by compiling libxml2
>>>ourselves, however that would probably make building pgAdmin
>>>far more difficult. Lesser of two evils 'n' all that...
>>
>>Can we link iconv statically? (That's what I did for my tests, that's
>>probably why I didn't notice it)
>
>
> LGPL...

So what? AFAICS we're complying with section 6 (a/d) of LPGL.
Anyhow, do we need to mention iconv/libxml somewhere in the docs?

Regards,
Andreas

Re: Query favourite comment

From
"Dave Page"
Date:

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 13 February 2006 14:18
> To: Dave Page
> Cc: Magnus Hagander; pgadmin-hackers
> Subject: Re: [pgadmin-hackers] Query favourite comment
>
>
> So what? AFAICS we're complying with section 6 (a/d) of LPGL.

Eh? Now we don't. Either of those would require that we supply the
libiconv source code. 6b is the easiest one, but that requires that we
dynamically link.

> Anyhow, do we need to mention iconv/libxml somewhere in the docs?

Libxml is MIT licenced which is more or less the same as BSD from what I
can see. And probably yes for iconv. I need to go through all of the
PostgreSQL and pgAdmin installers and make sure we've not missed
anything...

Regards, Dave.

Re: Query favourite comment

From
Andreas Pflug
Date:
Dave Page wrote:
>
>
>
>>-----Original Message-----
>>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
>>Sent: 13 February 2006 14:18
>>To: Dave Page
>>Cc: Magnus Hagander; pgadmin-hackers
>>Subject: Re: [pgadmin-hackers] Query favourite comment
>>
>>
>>So what? AFAICS we're complying with section 6 (a/d) of LPGL.
>
>
> Eh? Now we don't. Either of those would require that we supply the
> libiconv source code. 6b is the easiest one, but that requires that we
> dynamically link.
>
>
>>Anyhow, do we need to mention iconv/libxml somewhere in the docs?
>
>
> Libxml is MIT licenced which is more or less the same as BSD from what I
> can see. And probably yes for iconv. I need to go through all of the
> PostgreSQL and pgAdmin installers and make sure we've not missed
> anything...

Fine. We know you like this licensing stuff :-)

Regards,
Andreas

Re: Query favourite comment

From
"Dave Page"
Date:

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 13 February 2006 14:33
> To: Dave Page
> Cc: Magnus Hagander; pgadmin-hackers
> Subject: Re: [pgadmin-hackers] Query favourite comment
>
> Fine. We know you like this licensing stuff :-)
>

Yeah, love it. Can't get enough.

/D