Обсуждение: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

Поиск
Список
Период
Сортировка

Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Guillaume Lelarge
Дата:
Hi,

Here is a patch to add the support for this new 8.5 functionality. Ticket is
http://code.pgadmin.org/trac/ticket/95, commitfest item is
https://commitfest.postgresql.org/action/patch_view?id=73.

It was a quite simple patch. I used the git-svn method to get the code, and
build the patch. I'm not really used to it right now, I hope to find a real
use of this method.

Comments?

PS: there are something like 10 new functionalities that need to be supported
by pgAdmin, I made a list that I'll add as tickets on our trac instance.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Вложения

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Dave Page
Дата:
On Mon, Nov 23, 2009 at 2:40 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Hi,
>
> Here is a patch to add the support for this new 8.5 functionality. Ticket is
> http://code.pgadmin.org/trac/ticket/95, commitfest item is
> https://commitfest.postgresql.org/action/patch_view?id=73.

Seems useful to me.

> It was a quite simple patch. I used the git-svn method to get the code, and
> build the patch. I'm not really used to it right now, I hope to find a real
> use of this method.

How do you mean?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Guillaume Lelarge
Дата:
Le lundi 23 novembre 2009 à 10:36:03, Dave Page a écrit :
> On Mon, Nov 23, 2009 at 2:40 AM, Guillaume Lelarge
>
> <guillaume@lelarge.info> wrote:
> > Hi,
> >
> > Here is a patch to add the support for this new 8.5 functionality. Ticket
> > is http://code.pgadmin.org/trac/ticket/95, commitfest item is
> > https://commitfest.postgresql.org/action/patch_view?id=73.
>
> Seems useful to me.
>

Commited.

> > It was a quite simple patch. I used the git-svn method to get the code,
> > and build the patch. I'm not really used to it right now, I hope to find
> > a real use of this method.
>
> How do you mean?
>

I finally found local branches. They are quite useful :) So I think I'll try
to learn more about git.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Dave Page
Дата:
On Mon, Nov 23, 2009 at 8:00 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:

> I finally found local branches. They are quite useful :) So I think I'll try
> to learn more about git.

Ahh - there we go. Another convert :-).

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Guillaume Lelarge
Дата:
Le mardi 24 novembre 2009 à 09:50:17, Dave Page a écrit :
> On Mon, Nov 23, 2009 at 8:00 PM, Guillaume Lelarge
>
> <guillaume@lelarge.info> wrote:
> > I finally found local branches. They are quite useful :) So I think I'll
> > try to learn more about git.
>
> Ahh - there we go. Another convert :-).
>

Yes. I was quite impressed so far.

Unfortunately, yesterday evening, I had a big fight with it. I tried the "git
rebase git-svn --interactive", and I did a big mistake (IIRC, I tried to
squash the first commit, which it didn't like at all). I didn't find a way to
fix my mistake, so I had to "git svn clone" once again (which, BTW, is a
really long, long operation).

Anyways, aside from this minor issue (which is all my fault), I'm pleased with
it.


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Dave Page
Дата:
On Tue, Nov 24, 2009 at 9:14 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:

> Unfortunately, yesterday evening, I had a big fight with it. I tried the "git
> rebase git-svn --interactive", and I did a big mistake (IIRC, I tried to
> squash the first commit, which it didn't like at all). I didn't find a way to
> fix my mistake, so I had to "git svn clone" once again (which, BTW, is a
> really long, long operation).

Yeah, it is. I've never actually tried an interactive rebase. I
normally just 'git stash', then 'git svn rebase' and then 'git stash
apply'. I'm still a relative git newbie though - there may be better
ways to drive it.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Magnus Hagander
Дата:
On Tue, Nov 24, 2009 at 10:19, Dave Page <dpage@pgadmin.org> wrote:
> On Tue, Nov 24, 2009 at 9:14 AM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>
>> Unfortunately, yesterday evening, I had a big fight with it. I tried the "git
>> rebase git-svn --interactive", and I did a big mistake (IIRC, I tried to
>> squash the first commit, which it didn't like at all). I didn't find a way to
>> fix my mistake, so I had to "git svn clone" once again (which, BTW, is a
>> really long, long operation).
>
> Yeah, it is. I've never actually tried an interactive rebase. I
> normally just 'git stash', then 'git svn rebase' and then 'git stash
> apply'. I'm still a relative git newbie though - there may be better
> ways to drive it.

You really should check out the interactive rebase. It's awesome, once
you use it right.

But as Guillaume says, don't try to rebase your first commit.

Guillaume - you shouldn't have needed that, ever. Worst case, you
would've had to drop your local branch and create a new one. Or did
you try to do the rebase on the *svn* branch? You should never to it
on that one - only on your local branches.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Heikki Linnakangas
Дата:
Guillaume Lelarge wrote:
> Le mardi 24 novembre 2009 à 09:50:17, Dave Page a écrit :
>> On Mon, Nov 23, 2009 at 8:00 PM, Guillaume Lelarge
>>
>> <guillaume@lelarge.info> wrote:
>>> I finally found local branches. They are quite useful :) So I think I'll
>>> try to learn more about git.
>> Ahh - there we go. Another convert :-).
>>
>
> Yes. I was quite impressed so far.
>
> Unfortunately, yesterday evening, I had a big fight with it. I tried the "git
> rebase git-svn --interactive", and I did a big mistake (IIRC, I tried to
> squash the first commit, which it didn't like at all). I didn't find a way to
> fix my mistake, so I had to "git svn clone" once again (which, BTW, is a
> really long, long operation).

If you were still in rebase mode, "git rebase --abort" might've saved
you. Interactive rebase is very powerful. I use it every now and then
but you need to be a bit careful. And abort if it goes wrong.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Guillaume Lelarge
Дата:
Le mardi 24 novembre 2009 à 10:42:25, Heikki Linnakangas a écrit :
> Guillaume Lelarge wrote:
> > Le mardi 24 novembre 2009 à 09:50:17, Dave Page a écrit :
> >> On Mon, Nov 23, 2009 at 8:00 PM, Guillaume Lelarge
> >>
> >> <guillaume@lelarge.info> wrote:
> >>> I finally found local branches. They are quite useful :) So I think
> >>> I'll try to learn more about git.
> >>
> >> Ahh - there we go. Another convert :-).
> >
> > Yes. I was quite impressed so far.
> >
> > Unfortunately, yesterday evening, I had a big fight with it. I tried the
> > "git rebase git-svn --interactive", and I did a big mistake (IIRC, I
> > tried to squash the first commit, which it didn't like at all). I didn't
> > find a way to fix my mistake, so I had to "git svn clone" once again
> > (which, BTW, is a really long, long operation).
>
> If you were still in rebase mode, "git rebase --abort" might've saved
> you. Interactive rebase is very powerful. I use it every now and then
> but you need to be a bit careful. And abort if it goes wrong.
>

That did the trick. Thanks, Heikki :)


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Guillaume Lelarge
Дата:
Le mardi 24 novembre 2009 à 10:38:24, Magnus Hagander a écrit :
> On Tue, Nov 24, 2009 at 10:19, Dave Page <dpage@pgadmin.org> wrote:
> > On Tue, Nov 24, 2009 at 9:14 AM, Guillaume Lelarge
> >
> > <guillaume@lelarge.info> wrote:
> >> Unfortunately, yesterday evening, I had a big fight with it. I tried the
> >> "git rebase git-svn --interactive", and I did a big mistake (IIRC, I
> >> tried to squash the first commit, which it didn't like at all). I didn't
> >> find a way to fix my mistake, so I had to "git svn clone" once again
> >> (which, BTW, is a really long, long operation).
> >
> > Yeah, it is. I've never actually tried an interactive rebase. I
> > normally just 'git stash', then 'git svn rebase' and then 'git stash
> > apply'. I'm still a relative git newbie though - there may be better
> > ways to drive it.
>
> You really should check out the interactive rebase. It's awesome, once
> you use it right.
>
> But as Guillaume says, don't try to rebase your first commit.
>
> Guillaume - you shouldn't have needed that, ever. Worst case, you
> would've had to drop your local branch and create a new one. Or did
> you try to do the rebase on the *svn* branch? You should never to it
> on that one - only on your local branches.
>

Just on question on git, say I have a local branch with three commits. I want
to push them on the shared branch (shared seems the best word to describe it,
but I mean I want to commit onto the svn repository).

If I do the "interactive rebase" step, and then "git svn dcommit", will the
dcommit ask for my commit message? or will it use one of the commit message of
my previous local commits?


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Magnus Hagander
Дата:
On Tue, Nov 24, 2009 at 10:57, Guillaume Lelarge <guillaume@lelarge.info> wrote:
> Le mardi 24 novembre 2009 à 10:38:24, Magnus Hagander a écrit :
>> On Tue, Nov 24, 2009 at 10:19, Dave Page <dpage@pgadmin.org> wrote:
>> > On Tue, Nov 24, 2009 at 9:14 AM, Guillaume Lelarge
>> >
>> > <guillaume@lelarge.info> wrote:
>> >> Unfortunately, yesterday evening, I had a big fight with it. I tried the
>> >> "git rebase git-svn --interactive", and I did a big mistake (IIRC, I
>> >> tried to squash the first commit, which it didn't like at all). I didn't
>> >> find a way to fix my mistake, so I had to "git svn clone" once again
>> >> (which, BTW, is a really long, long operation).
>> >
>> > Yeah, it is. I've never actually tried an interactive rebase. I
>> > normally just 'git stash', then 'git svn rebase' and then 'git stash
>> > apply'. I'm still a relative git newbie though - there may be better
>> > ways to drive it.
>>
>> You really should check out the interactive rebase. It's awesome, once
>> you use it right.
>>
>> But as Guillaume says, don't try to rebase your first commit.
>>
>> Guillaume - you shouldn't have needed that, ever. Worst case, you
>> would've had to drop your local branch and create a new one. Or did
>> you try to do the rebase on the *svn* branch? You should never to it
>> on that one - only on your local branches.
>>
>
> Just on question on git, say I have a local branch with three commits. I want
> to push them on the shared branch (shared seems the best word to describe it,
> but I mean I want to commit onto the svn repository).
>
> If I do the "interactive rebase" step, and then "git svn dcommit", will the
> dcommit ask for my commit message? or will it use one of the commit message of
> my previous local commits?

dcommit only pushes existing commits, so it will not ask for a new one.

It will push each of your commits on your local branch as a separate
commit to the svn server, and use individual commit messages for each
one. This is why you want to do an interactive rebase - so you don't
end up pushing all your minor commits out automatically.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Next patch for 8.5 support: ALTER TABLE ... ALTER COLUMN ... SET STATISTICS DISTINCT

От
Guillaume Lelarge
Дата:
Le mardi 24 novembre 2009 à 11:34:40, Magnus Hagander a écrit :
> On Tue, Nov 24, 2009 at 10:57, Guillaume Lelarge <guillaume@lelarge.info>
wrote:
> > Le mardi 24 novembre 2009 à 10:38:24, Magnus Hagander a écrit :
> >> On Tue, Nov 24, 2009 at 10:19, Dave Page <dpage@pgadmin.org> wrote:
> >> > On Tue, Nov 24, 2009 at 9:14 AM, Guillaume Lelarge
> >> >
> >> > <guillaume@lelarge.info> wrote:
> >> >> Unfortunately, yesterday evening, I had a big fight with it. I tried
> >> >> the "git rebase git-svn --interactive", and I did a big mistake
> >> >> (IIRC, I tried to squash the first commit, which it didn't like at
> >> >> all). I didn't find a way to fix my mistake, so I had to "git svn
> >> >> clone" once again (which, BTW, is a really long, long operation).
> >> >
> >> > Yeah, it is. I've never actually tried an interactive rebase. I
> >> > normally just 'git stash', then 'git svn rebase' and then 'git stash
> >> > apply'. I'm still a relative git newbie though - there may be better
> >> > ways to drive it.
> >>
> >> You really should check out the interactive rebase. It's awesome, once
> >> you use it right.
> >>
> >> But as Guillaume says, don't try to rebase your first commit.
> >>
> >> Guillaume - you shouldn't have needed that, ever. Worst case, you
> >> would've had to drop your local branch and create a new one. Or did
> >> you try to do the rebase on the *svn* branch? You should never to it
> >> on that one - only on your local branches.
> >
> > Just on question on git, say I have a local branch with three commits. I
> > want to push them on the shared branch (shared seems the best word to
> > describe it, but I mean I want to commit onto the svn repository).
> >
> > If I do the "interactive rebase" step, and then "git svn dcommit", will
> > the dcommit ask for my commit message? or will it use one of the commit
> > message of my previous local commits?
>
> dcommit only pushes existing commits, so it will not ask for a new one.
>
> It will push each of your commits on your local branch as a separate
> commit to the svn server, and use individual commit messages for each
> one. This is why you want to do an interactive rebase - so you don't
> end up pushing all your minor commits out automatically.
>

I should probably try it to really understand it...


--
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com