Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Mon, 2011-07-04 at 23:42 +0200, Jasmin Dizdarevic wrote:
> 
> 
> 2011/7/4 Guillaume Lelarge 
> On Mon, 2011-07-04 at 09:10 +0200, Guillaume Lelarge wrote:
> > On Sun, 2011-07-03 at 23:39 +0200, Jasmin Dizdarevic wrote:
> > > Could somebody review the patch and maybe commit it?
> > >
> >
> > I'll look into it tonight, unless someone beats me to it.
> >
> 
> 
> Thank's for checking.
>  
> 
> Seems mostly good to me, but I have too questions:
> 
>  * why do you use twice the Trim command in
> 
> "browser->GetItemText(parent).BeforeFirst('(').Trim().Trim(false)"?
> 
> 
> I've misunderstood the wx-docs. 
>  
>  * why is the search object menu only available to non
> maintenance DB?
> (((pgDatabase *)obj)->GetName() != ((pgDatabase
> *)obj)->GetServer()->GetDatabaseName())
> 
> 
> 
> copy-paste mistake
> 
> 
> patch attached.
>  

OK, I'm still working on it. I need the search.png image, can you send
it to me? as I can't apply the patch, I can't extract the image. Thanks.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
> Sure.
> 

Thanks. I'm almost done, and ready to apply :)


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
 wrote:
> On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
>> Sure.
>>
>
> Thanks. I'm almost done, and ready to apply :)

Looks like that dialogue needs some tweaking (status bar, button
positioning - actually, we don't normally have close buttons do we?).


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Guillaume Lelarge
Hi Thom,

On Tue, 2011-07-05 at 20:23 +0100, Thom Brown wrote:
> [...]
> I noticed that objects which can be moved to different schemas can't
> be moved in PgAdmin, so I looked to see if there was any request to
> have this implemented, and found this ticket:
> http://code.pgadmin.org/trac/ticket/5
> 

Exactly. I did a complete patch once, but my main issue, that I couldn't
fix, was the refresh of the schemas in the browser.

> So I have now implemented this.  A schema drop-down box will appear in
> the properties dialogue for each relevant object beneath the owner
> drop-down.

Did you fix the issue with the refresh of the browser? (I can't check
yet, I'm doing a last time compile of Jasmin's patch :) )

>   I noticed that the Extensions properties dialogue already
> had one in it (and I've changed how it works),

Oops, that was probably a bad move. Extensions don't have schemas by
themselves. Their objects have one, but not the extension in itself.
(Once again, I may be wrong as I didn't read your patch yet)

>  but left it where it
> was.  In order to implement these changes, I had to also fix quite a
> few bugs, and while I was at it, implemented a few additional changes.
>  They are as follows:
> 
> - Prevent functions having a complete rewrite when changing owner
> - Add the ability to specify an owner for operators at creation time
> - Fix invalid syntax on text search configuration, parser and template
> when modifying the name
> - Fix unescaped name when modifying text search configuration, parser
> and template name
> - Disabled the owner field on text search dictionaries as it cannot be 
> modified
> - Allow renaming types for versions 8.4 and higher
> 

You're gonna hate me, but can you extract the fixes, one by one, from
the actual new feature? even if we won't apply all of them to 1.14, I
don't want to mix them with the real new feature (at least for
pgAdmin :) ).

> I also refactored some code, including re-basing the extensions class
> on the pgSchema class rather than pgDatabase

Bad move once again. An extension doesn't have a schema.

> , replace explicit SET
> OWNER clauses with common function

Can you explain that one?

>  and tore out a few things from the
> text search classes which were just causing problems rather than
> helping.
> 

More explanations please?

> Anyway, patch attached.  I've tested every object's creation and
> modification in various combinations on PostgreSQL 8.4 and 9.0, but if
> this patch is a viable candidate for committing then will need testing
> on earlier versions too.  Plus some code review since I'm a n00b.
> Also look at how I'm selecting the list of schemas in case there
> should be any additional ones which should be filtered out.
> 

Will look into it.

> Cheers!
> 

Thanks a lot for your work. This patch was something I was waiting for.

BTW, are you going to char(11)?


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 8:47 PM, Guillaume Lelarge
 wrote:
>
> Thanks a lot for your work. This patch was something I was waiting for.

A few weeks back I had to talk Thom into posting a 2 line fix. I'm
beginning to think I may have unleashed some sort of rampant patch
beast...

> BTW, are you going to char(11)?

Are you? Did we have that conversation already? :-)

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 20:42 +0100, Dave Page wrote:
> On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
>  wrote:
> > On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
> >> Sure.
> >>
> >
> > Thanks. I'm almost done, and ready to apply :)
> 
> Looks like that dialogue needs some tweaking (status bar, button
> positioning - actually, we don't normally have close buttons do we?).
> 

Yeah, I worked on it, and I tweaked a few things in the source code. I
also took care of the Visual Studio projects.

We do have close button, or at least one (in the dlgFindReplace dialog).
And it seems fine here. I don't see the point to remove it.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread jasmin . dizdarevic
Is a status bar really neccessary? 
There is just one message to be displayed ;)

--Originalnachricht--
Von: Guillaume Lelarge
An:Dave Page
Cc:Jasmin Dizdarevic
Cc:pgadmin-hackers@postgresql.org
Betreff: Re: Fwd: [pgadmin-hackers] Discussion - Search Objects
Gesendet: 5. Jul. 2011 21:50

On Tue, 2011-07-05 at 20:42 +0100, Dave Page wrote:
> On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
>  wrote:
> > On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
> >> Sure.
> >>
> >
> > Thanks. I'm almost done, and ready to apply :)
> 
> Looks like that dialogue needs some tweaking (status bar, button
> positioning - actually, we don't normally have close buttons do we?).
> 

Yeah, I worked on it, and I tweaked a few things in the source code. I
also took care of the Visual Studio projects.

We do have close button, or at least one (in the dlgFindReplace dialog).
And it seems fine here. I don't see the point to remove it.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com



A1 präsentiert BlackBerry® von Vodafone
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 20:51 +0100, Dave Page wrote:
> On Tue, Jul 5, 2011 at 8:47 PM, Guillaume Lelarge
>  wrote:
> >
> > Thanks a lot for your work. This patch was something I was waiting for.
> 
> A few weeks back I had to talk Thom into posting a 2 line fix. I'm
> beginning to think I may have unleashed some sort of rampant patch
> beast...
> 

You *may* have? you absolutely did. Which feels great honestly ;-) he
should keep the patches coming (even if it prevents me from working on
the documentation at the same time).

> > BTW, are you going to char(11)?
> 
> Are you? Did we have that conversation already? :-)
> 

I am. And we had a conversation about it. But I don't know for Thom. Or
did you tell me? if you did, I can only blame my memory...


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 8:50 PM, Guillaume Lelarge
 wrote:
> On Tue, 2011-07-05 at 20:42 +0100, Dave Page wrote:
>> On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
>>  wrote:
>> > On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
>> >> Sure.
>> >>
>> >
>> > Thanks. I'm almost done, and ready to apply :)
>>
>> Looks like that dialogue needs some tweaking (status bar, button
>> positioning - actually, we don't normally have close buttons do we?).
>>
>
> Yeah, I worked on it, and I tweaked a few things in the source code. I
> also took care of the Visual Studio projects.
>
> We do have close button, or at least one (in the dlgFindReplace dialog).
> And it seems fine here. I don't see the point to remove it.

:-)

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 19:54 +, jasmin.dizdare...@gmail.com wrote:
> Is a status bar really neccessary? 
> There is just one message to be displayed ;)
> 

It's better to keep the UI consistent. And it's not a huge work.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 8:54 PM,   wrote:
> Is a status bar really neccessary?
> There is just one message to be displayed ;)

It maintains consistency of look and feel across the app.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 8:57 PM, Guillaume Lelarge
 wrote:
> On Tue, 2011-07-05 at 20:51 +0100, Dave Page wrote:
>> On Tue, Jul 5, 2011 at 8:47 PM, Guillaume Lelarge
>>  wrote:
>> >
>> > Thanks a lot for your work. This patch was something I was waiting for.
>>
>> A few weeks back I had to talk Thom into posting a 2 line fix. I'm
>> beginning to think I may have unleashed some sort of rampant patch
>> beast...
>>
>
> You *may* have? you absolutely did. Which feels great honestly ;-) he
> should keep the patches coming (even if it prevents me from working on
> the documentation at the same time).

Oh yes - definitely +1. I'm certainly not complaining.

>> > BTW, are you going to char(11)?
>>
>> Are you? Did we have that conversation already? :-)
>>
>
> I am. And we had a conversation about it. But I don't know for Thom. Or
> did you tell me? if you did, I can only blame my memory...

:-). I'm just as bad. I think I'm the only EDBer going.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread jasmin . dizdarevic
Are you siamese twins? :)
--Originalnachricht--
Von: Dave Page
An:jasmin.dizdare...@gmail.com
Cc:Guillaume Lelarge
Cc:pgadmin-hackers@postgresql.org
Betreff: Re: Re: Fwd: [pgadmin-hackers] Discussion - Search Objects
Gesendet: 5. Jul. 2011 22:00

On Tue, Jul 5, 2011 at 8:54 PM,   wrote:
> Is a status bar really neccessary?
> There is just one message to be displayed ;)

It maintains consistency of look and feel across the app.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


A1 präsentiert BlackBerry® von Vodafone
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Thom Brown
On 5 July 2011 20:47, Guillaume Lelarge  wrote:
> Hi Thom,
>
> On Tue, 2011-07-05 at 20:23 +0100, Thom Brown wrote:
>> [...]
>> I noticed that objects which can be moved to different schemas can't
>> be moved in PgAdmin, so I looked to see if there was any request to
>> have this implemented, and found this ticket:
>> http://code.pgadmin.org/trac/ticket/5
>>
>
> Exactly. I did a complete patch once, but my main issue, that I couldn't
> fix, was the refresh of the schemas in the browser.
>
>> So I have now implemented this.  A schema drop-down box will appear in
>> the properties dialogue for each relevant object beneath the owner
>> drop-down.
>
> Did you fix the issue with the refresh of the browser? (I can't check
> yet, I'm doing a last time compile of Jasmin's patch :) )

I got it refreshing the node in the original schema, but not the
destination one.

>>   I noticed that the Extensions properties dialogue already
>> had one in it (and I've changed how it works),
>
> Oops, that was probably a bad move. Extensions don't have schemas by
> themselves. Their objects have one, but not the extension in itself.
> (Once again, I may be wrong as I didn't read your patch yet)

Well from reading the docs, it suggested the extension itself resided
within a schema, but maybe you're right.

>>  but left it where it
>> was.  In order to implement these changes, I had to also fix quite a
>> few bugs, and while I was at it, implemented a few additional changes.
>>  They are as follows:
>>
>> - Prevent functions having a complete rewrite when changing owner
>> - Add the ability to specify an owner for operators at creation time
>> - Fix invalid syntax on text search configuration, parser and template
>> when modifying the name
>> - Fix unescaped name when modifying text search configuration, parser
>> and template name
>> - Disabled the owner field on text search dictionaries as it cannot be 
>> modified
>> - Allow renaming types for versions 8.4 and higher
>>
>
> You're gonna hate me, but can you extract the fixes, one by one, from
> the actual new feature? even if we won't apply all of them to 1.14, I
> don't want to mix them with the real new feature (at least for
> pgAdmin :) ).

Hmmm... okay, I'll look at doing that.

>> I also refactored some code, including re-basing the extensions class
>> on the pgSchema class rather than pgDatabase
>
> Bad move once again. An extension doesn't have a schema.
>
>> , replace explicit SET
>> OWNER clauses with common function
>
> Can you explain that one?

Rather than building up the ALTER  SET OWNER in each class, I
made them all use the AppendOwnerChange function

>>  and tore out a few things from the
>> text search classes which were just causing problems rather than
>> helping.
>>
>
> More explanations please?

The GetQuoteIdentifier functions these class headers implemented (e.g.
include/schema/pgTextSearchConfiguration.h) didn't quote the name from
what I recall, so ended up deleting them, and they just inherit the
same function from its base class.

>> Cheers!
>>
>
> Thanks a lot for your work. This patch was something I was waiting for.
>
> BTW, are you going to char(11)?

Unfortunately no. :(

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 21:00 +0100, Dave Page wrote:
> On Tue, Jul 5, 2011 at 8:54 PM,   wrote:
> > Is a status bar really neccessary?
> > There is just one message to be displayed ;)
> 
> It maintains consistency of look and feel across the app.
> 

That's also what I replied. But I just noticed that the dlgFindReplace
dialog doesn't have a status bar.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Thom Brown
On 5 July 2011 20:51, Dave Page  wrote:
> On Tue, Jul 5, 2011 at 8:47 PM, Guillaume Lelarge
>  wrote:
>>
>> Thanks a lot for your work. This patch was something I was waiting for.
>
> A few weeks back I had to talk Thom into posting a 2 line fix. I'm
> beginning to think I may have unleashed some sort of rampant patch
> beast...

:/

>> BTW, are you going to char(11)?
>
> Are you? Did we have that conversation already? :-)

No, and no. :(

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 9:02 PM,   wrote:
> Are you siamese twins? :)

That'd be a bit tricky - the worlds busiest shipping lane is between us.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 9:02 PM, Guillaume Lelarge
 wrote:
> On Tue, 2011-07-05 at 21:00 +0100, Dave Page wrote:
>> On Tue, Jul 5, 2011 at 8:54 PM,   wrote:
>> > Is a status bar really neccessary?
>> > There is just one message to be displayed ;)
>>
>> It maintains consistency of look and feel across the app.
>>
>
> That's also what I replied. But I just noticed that the dlgFindReplace
> dialog doesn't have a status bar.

I blame that guy that overhauled all the dialogues not long ago :-p



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 21:01 +0100, Thom Brown wrote:
> On 5 July 2011 20:47, Guillaume Lelarge  wrote:
> > Hi Thom,
> >
> > On Tue, 2011-07-05 at 20:23 +0100, Thom Brown wrote:
> >> [...]
> >> I noticed that objects which can be moved to different schemas can't
> >> be moved in PgAdmin, so I looked to see if there was any request to
> >> have this implemented, and found this ticket:
> >> http://code.pgadmin.org/trac/ticket/5
> >>
> >
> > Exactly. I did a complete patch once, but my main issue, that I couldn't
> > fix, was the refresh of the schemas in the browser.
> >
> >> So I have now implemented this.  A schema drop-down box will appear in
> >> the properties dialogue for each relevant object beneath the owner
> >> drop-down.
> >
> > Did you fix the issue with the refresh of the browser? (I can't check
> > yet, I'm doing a last time compile of Jasmin's patch :) )
> 
> I got it refreshing the node in the original schema, but not the
> destination one.
> 

Which is an issue. People may understand that pgadmin doesn't know about
new or altered objects if the object is created or changed outside of
the UI. But inside the UI, it should refresh its browser.

> >>   I noticed that the Extensions properties dialogue already
> >> had one in it (and I've changed how it works),
> >
> > Oops, that was probably a bad move. Extensions don't have schemas by
> > themselves. Their objects have one, but not the extension in itself.
> > (Once again, I may be wrong as I didn't read your patch yet)
> 
> Well from reading the docs, it suggested the extension itself resided
> within a schema, but maybe you're right.
> 

Not the extension, but the objects it owns.

> >>  but left it where it
> >> was.  In order to implement these changes, I had to also fix quite a
> >> few bugs, and while I was at it, implemented a few additional changes.
> >>  They are as follows:
> >>
> >> - Prevent functions having a complete rewrite when changing owner
> >> - Add the ability to specify an owner for operators at creation time
> >> - Fix invalid syntax on text search configuration, parser and template
> >> when modifying the name
> >> - Fix unescaped name when modifying text search configuration, parser
> >> and template name
> >> - Disabled the owner field on text search dictionaries as it cannot be 
> >> modified
> >> - Allow renaming types for versions 8.4 and higher
> >>
> >
> > You're gonna hate me, but can you extract the fixes, one by one, from
> > the actual new feature? even if we won't apply all of them to 1.14, I
> > don't want to mix them with the real new feature (at least for
> > pgAdmin :) ).
> 
> Hmmm... okay, I'll look at doing that.
> 

Thanks.

> >> I also refactored some code, including re-basing the extensions class
> >> on the pgSchema class rather than pgDatabase
> >
> > Bad move once again. An extension doesn't have a schema.
> >
> >> , replace explicit SET
> >> OWNER clauses with common function
> >
> > Can you explain that one?
> 
> Rather than building up the ALTER  SET OWNER in each class, I
> made them all use the AppendOwnerChange function
> 

Oh, great. Thanks.

> >>  and tore out a few things from the
> >> text search classes which were just causing problems rather than
> >> helping.
> >>
> >
> > More explanations please?
> 
> The GetQuoteIdentifier functions these class headers implemented (e.g.
> include/schema/pgTextSearchConfiguration.h) didn't quote the name from
> what I recall, so ended up deleting them, and they just inherit the
> same function from its base class.
> 

OK, good thing too.

> >> Cheers!
> >>
> >
> > Thanks a lot for your work. This patch was something I was waiting for.
> >
> > BTW, are you going to char(11)?
> 
> Unfortunately no. :(
> 

Too bad. I owe you a beer next time.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 21:05 +0100, Dave Page wrote:
> On Tue, Jul 5, 2011 at 9:02 PM, Guillaume Lelarge
>  wrote:
> > On Tue, 2011-07-05 at 21:00 +0100, Dave Page wrote:
> >> On Tue, Jul 5, 2011 at 8:54 PM,   wrote:
> >> > Is a status bar really neccessary?
> >> > There is just one message to be displayed ;)
> >>
> >> It maintains consistency of look and feel across the app.
> >>
> >
> > That's also what I replied. But I just noticed that the dlgFindReplace
> > dialog doesn't have a status bar.
> 
> I blame that guy that overhauled all the dialogues not long ago :-p
> 

Who was that guy? Do I know him? jeez, this memory... :-D


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Jasmin Dizdarevic
2011/7/5 Guillaume Lelarge 

> On Tue, 2011-07-05 at 21:01 +0100, Thom Brown wrote:
> > On 5 July 2011 20:47, Guillaume Lelarge  wrote:
> > > Hi Thom,
> > >
> > > On Tue, 2011-07-05 at 20:23 +0100, Thom Brown wrote:
> > >> [...]
> > >> I noticed that objects which can be moved to different schemas can't
> > >> be moved in PgAdmin, so I looked to see if there was any request to
> > >> have this implemented, and found this ticket:
> > >> http://code.pgadmin.org/trac/ticket/5
> > >>
> > >
> > > Exactly. I did a complete patch once, but my main issue, that I
> couldn't
> > > fix, was the refresh of the schemas in the browser.
> > >
> > >> So I have now implemented this.  A schema drop-down box will appear in
> > >> the properties dialogue for each relevant object beneath the owner
> > >> drop-down.
> > >
> > > Did you fix the issue with the refresh of the browser? (I can't check
> > > yet, I'm doing a last time compile of Jasmin's patch :) )
> >
> > I got it refreshing the node in the original schema, but not the
> > destination one.
> >
>
> Which is an issue. People may understand that pgadmin doesn't know about
> new or altered objects if the object is created or changed outside of
> the UI. But inside the UI, it should refresh its browser.
>

He Tom,

can't you use frmMain::GetNodePath and frmMain::SetCurrentNode to do this?
I don't exactly know what you're doing, but it should be possible to replace
old schema name with the new one.

1. Extract path of old object
2. replace old schema name with new one
3. select the object in the new schema

?


>
> > >>   I noticed that the Extensions properties dialogue already
> > >> had one in it (and I've changed how it works),
> > >
> > > Oops, that was probably a bad move. Extensions don't have schemas by
> > > themselves. Their objects have one, but not the extension in itself.
> > > (Once again, I may be wrong as I didn't read your patch yet)
> >
> > Well from reading the docs, it suggested the extension itself resided
> > within a schema, but maybe you're right.
> >
>
> Not the extension, but the objects it owns.
>
> > >>  but left it where it
> > >> was.  In order to implement these changes, I had to also fix quite a
> > >> few bugs, and while I was at it, implemented a few additional changes.
> > >>  They are as follows:
> > >>
> > >> - Prevent functions having a complete rewrite when changing owner
> > >> - Add the ability to specify an owner for operators at creation time
> > >> - Fix invalid syntax on text search configuration, parser and template
> > >> when modifying the name
> > >> - Fix unescaped name when modifying text search configuration, parser
> > >> and template name
> > >> - Disabled the owner field on text search dictionaries as it cannot be
> modified
> > >> - Allow renaming types for versions 8.4 and higher
> > >>
> > >
> > > You're gonna hate me, but can you extract the fixes, one by one, from
> > > the actual new feature? even if we won't apply all of them to 1.14, I
> > > don't want to mix them with the real new feature (at least for
> > > pgAdmin :) ).
> >
> > Hmmm... okay, I'll look at doing that.
> >
>
> Thanks.
>
> > >> I also refactored some code, including re-basing the extensions class
> > >> on the pgSchema class rather than pgDatabase
> > >
> > > Bad move once again. An extension doesn't have a schema.
> > >
> > >> , replace explicit SET
> > >> OWNER clauses with common function
> > >
> > > Can you explain that one?
> >
> > Rather than building up the ALTER  SET OWNER in each class, I
> > made them all use the AppendOwnerChange function
> >
>
> Oh, great. Thanks.
>
> > >>  and tore out a few things from the
> > >> text search classes which were just causing problems rather than
> > >> helping.
> > >>
> > >
> > > More explanations please?
> >
> > The GetQuoteIdentifier functions these class headers implemented (e.g.
> > include/schema/pgTextSearchConfiguration.h) didn't quote the name from
> > what I recall, so ended up deleting them, and they just inherit the
> > same function from its base class.
> >
>
> OK, good thing too.
>
> > >> Cheers!
> > >>
> > >
> > > Thanks a lot for your work. This patch was something I was waiting for.
> > >
> > > BTW, are you going to char(11)?
> >
> > Unfortunately no. :(
> >
>
> Too bad. I owe you a beer next time.
>
>
> --
> Guillaume
>  http://blog.guillaume.lelarge.info
>  http://www.dalibo.com
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Thom Brown
On 5 July 2011 21:14, Jasmin Dizdarevic  wrote:
>> > > Did you fix the issue with the refresh of the browser? (I can't check
>> > > yet, I'm doing a last time compile of Jasmin's patch :) )
>> >
>> > I got it refreshing the node in the original schema, but not the
>> > destination one.
>> >
>>
>> Which is an issue. People may understand that pgadmin doesn't know about
>> new or altered objects if the object is created or changed outside of
>> the UI. But inside the UI, it should refresh its browser.
>
> He Tom,
> can't you use frmMain::GetNodePath and frmMain::SetCurrentNode to do this?
> I don't exactly know what you're doing, but it should be possible to replace
> old schema name with the new one.
> 1. Extract path of old object
> 2. replace old schema name with new one
> 3. select the object in the new schema
> ?

I'm not at all familiar with PgAdmin's codebase, I'm just feeling in
the dark so I don't know how easy it is to do that.

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Thom Brown
On 5 July 2011 21:08, Guillaume Lelarge  wrote:
> On Tue, 2011-07-05 at 21:01 +0100, Thom Brown wrote:
>> On 5 July 2011 20:47, Guillaume Lelarge  wrote:
>> > Hi Thom,
>> >
>> > On Tue, 2011-07-05 at 20:23 +0100, Thom Brown wrote:
>> >> [...]
>> >> I noticed that objects which can be moved to different schemas can't
>> >> be moved in PgAdmin, so I looked to see if there was any request to
>> >> have this implemented, and found this ticket:
>> >> http://code.pgadmin.org/trac/ticket/5
>> >>
>> >
>> > Exactly. I did a complete patch once, but my main issue, that I couldn't
>> > fix, was the refresh of the schemas in the browser.
>> >
>> >> So I have now implemented this.  A schema drop-down box will appear in
>> >> the properties dialogue for each relevant object beneath the owner
>> >> drop-down.
>> >
>> > Did you fix the issue with the refresh of the browser? (I can't check
>> > yet, I'm doing a last time compile of Jasmin's patch :) )
>>
>> I got it refreshing the node in the original schema, but not the
>> destination one.
>>
>
> Which is an issue. People may understand that pgadmin doesn't know about
> new or altered objects if the object is created or changed outside of
> the UI. But inside the UI, it should refresh its browser.
>
>> >>   I noticed that the Extensions properties dialogue already
>> >> had one in it (and I've changed how it works),
>> >
>> > Oops, that was probably a bad move. Extensions don't have schemas by
>> > themselves. Their objects have one, but not the extension in itself.
>> > (Once again, I may be wrong as I didn't read your patch yet)
>>
>> Well from reading the docs, it suggested the extension itself resided
>> within a schema, but maybe you're right.
>>
>
> Not the extension, but the objects it owns.

I don't understand the issue.  The current beta runs exactly the same
SQL.  And the reason why I rebased it was because otherwise the
Extensions dialogue couldn't benefit from the dlgProperty methods
relating to schemas.  I noticed there was mention of other schemas in
the code, so I may have not factored those into filtering the list of
schemas.

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [FEATURE] Add schema option to all relevant objects

2011-07-05 Thread Jasmin Dizdarevic
Me too...it's quite hard to get in ;)

GetNodePath returns a string representing an language dependent node path:
Server Groups/localhost/Databases/myDb/Schemas/mySchema/Tables/myTable
SetCurrentNodePath accpet the string node path and select's the desired
object.

During implementing search object I've done some improvements to this
methods, so you should maybe wait for Guillaume committing my patch.

2011/7/5 Thom Brown 

> On 5 July 2011 21:14, Jasmin Dizdarevic 
> wrote:
> >> > > Did you fix the issue with the refresh of the browser? (I can't
> check
> >> > > yet, I'm doing a last time compile of Jasmin's patch :) )
> >> >
> >> > I got it refreshing the node in the original schema, but not the
> >> > destination one.
> >> >
> >>
> >> Which is an issue. People may understand that pgadmin doesn't know about
> >> new or altered objects if the object is created or changed outside of
> >> the UI. But inside the UI, it should refresh its browser.
> >
> > He Tom,
> > can't you use frmMain::GetNodePath and frmMain::SetCurrentNode to do
> this?
> > I don't exactly know what you're doing, but it should be possible to
> replace
> > old schema name with the new one.
> > 1. Extract path of old object
> > 2. replace old schema name with new one
> > 3. select the object in the new schema
> > ?
>
> I'm not at all familiar with PgAdmin's codebase, I'm just feeling in
> the dark so I don't know how easy it is to do that.
>
> --
> Thom Brown
> Twitter: @darkixion
> IRC (freenode): dark_ixion
> Registered Linux user: #516935
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] Changing extension schema silently fails

2011-07-05 Thread Thom Brown
On 5 July 2011 21:23, Thom Brown  wrote:
> Hi,
>
> I'm using the latest head and I created the file_fdw extension, then
> attempted to change its schema.  No error was returned, but it
> remained in the same schema.
>
> I then dropped the extension and created it again specifying the new
> schema, and it is correctly assigned to that schema.
>
> Am I missing something, or does this fail silently?

Ignore, wrong mailing list!

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Changing extension schema silently fails

2011-07-05 Thread Thom Brown
Hi,

I'm using the latest head and I created the file_fdw extension, then
attempted to change its schema.  No error was returned, but it
remained in the same schema.

I then dropped the extension and created it again specifying the new
schema, and it is correctly assigned to that schema.

Am I missing something, or does this fail silently?

-- 
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin III commit: Add "Search Objects" dialog

2011-07-05 Thread Guillaume Lelarge
Add "Search Objects" dialog

This dialog, available from the database contextual menu, helps users to find
objects whose names match a specific pattern.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=38622ecbc08b565621c1204c48051487fc548100
Author: Jasmin Dizdarevic 

Modified Files
--
CHANGELOG |1 +
docs/Docs.vcproj  |8 +
docs/en_US/images/search.png  |  Bin 0 -> 42201 bytes
docs/en_US/search.html|   35 +++
pgadmin/dlg/dlgSearchObject.cpp   |  506 +
pgadmin/dlg/module.mk |1 +
pgadmin/frm/frmMain.cpp   |   36 ++-
pgadmin/include/dlg/dlgSearchObject.h |   75 +
pgadmin/include/dlg/module.mk |1 +
pgadmin/include/frm/frmMain.h |3 +-
pgadmin/include/frm/module.mk |2 +-
pgadmin/pgAdmin3.vcproj   |   12 +
pgadmin/ui/dlgSearchObject.xrc|  123 
pgadmin/ui/module.mk  |1 +
14 files changed, 793 insertions(+), 11 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Guillaume Lelarge
On Tue, 2011-07-05 at 20:42 +0100, Dave Page wrote:
> On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
>  wrote:
> > On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
> >> Sure.
> >>
> >
> > Thanks. I'm almost done, and ready to apply :)
> 
> Looks like that dialogue needs some tweaking (status bar, button
> positioning - actually, we don't normally have close buttons do we?).
> 
> 

Kept the close button, but added the status bar and button positioning.
Commited, and pushed.

Thanks, Jasmin.


-- 
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Jasmin Dizdarevic
Great that it's done. Thank you for beautification.


2011/7/5 Guillaume Lelarge 

> On Tue, 2011-07-05 at 20:42 +0100, Dave Page wrote:
> > On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
> >  wrote:
> > > On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
> > >> Sure.
> > >>
> > >
> > > Thanks. I'm almost done, and ready to apply :)
> >
> > Looks like that dialogue needs some tweaking (status bar, button
> > positioning - actually, we don't normally have close buttons do we?).
> >
> >
>
> Kept the close button, but added the status bar and button positioning.
> Commited, and pushed.
>
> Thanks, Jasmin.
>
>
> --
> Guillaume
>  http://blog.guillaume.lelarge.info
>  http://www.dalibo.com
>
>


Re: Fwd: [pgadmin-hackers] Discussion - Search Objects

2011-07-05 Thread Dave Page
On Tue, Jul 5, 2011 at 10:06 PM, Guillaume Lelarge
 wrote:
> On Tue, 2011-07-05 at 20:42 +0100, Dave Page wrote:
>> On Tue, Jul 5, 2011 at 8:35 PM, Guillaume Lelarge
>>  wrote:
>> > On Tue, 2011-07-05 at 21:33 +0200, Jasmin Dizdarevic wrote:
>> >> Sure.
>> >>
>> >
>> > Thanks. I'm almost done, and ready to apply :)
>>
>> Looks like that dialogue needs some tweaking (status bar, button
>> positioning - actually, we don't normally have close buttons do we?).
>>
>>
>
> Kept the close button, but added the status bar and button positioning.
> Commited, and pushed.
>
> Thanks, Jasmin.

+1 - thanks indeed :-)



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] pgAdmin III commit: Update xrcDialogs.cpp, and "make syle"

2011-07-05 Thread Guillaume Lelarge
Update xrcDialogs.cpp, and "make syle"

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=487c52ee62fb22ccf2c8a478a5f480a7f3f79ac6

Modified Files
--
pgadmin/dlg/dlgSearchObject.cpp |8 +-
pgadmin/dlg/dlgSequence.cpp |4 +-
pgadmin/ui/xrcDialogs.cpp   |  374 ++-
3 files changed, 300 insertions(+), 86 deletions(-)


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers