Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-17 Thread Michael Paquier
On Mon, Dec 17, 2018 at 02:24:08PM -0500, Tom Lane wrote: > I eyeballed the patch, and it seems reasonable to me as well. The test > case could perhaps be made more extensive (say, a multicolumn index > with a mix of columns with and without stats targets) but I'm not sure > that it's worth the tr

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-17 Thread Tom Lane
amul sul writes: >> On Mon, Dec 17, 2018 at 11:54 AM Michael Paquier >>> So this settles the argument that we had better not do anything before >>> v11. Switching the dump code to use column numbers has not proved to be >>> complicated as only the query and some comments had to be tweaked. >>> A

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-17 Thread amul sul
On Mon, Dec 17, 2018 at 12:20 PM amul sul wrote: > On Mon, Dec 17, 2018 at 11:54 AM Michael Paquier > wrote: > > > > On Mon, Dec 17, 2018 at 12:24:15AM -0500, Tom Lane wrote: > > > If we were to rename the "foo.expr" column at this point, > > > and then dump and reload, the expression column in

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-17 Thread amul sul
On Mon, Dec 17, 2018 at 1:57 PM Michael Paquier wrote: > On Mon, Dec 17, 2018 at 01:19:00PM +0530, amul sul wrote: > > Laptop215:PG edb$ git --version > > git version 2.14.1 > > Using 2.20, git apply works fine for me but... If patch -p1 works, why > not just using it then? It is always possibl

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-17 Thread Michael Paquier
On Mon, Dec 17, 2018 at 01:19:00PM +0530, amul sul wrote: > Laptop215:PG edb$ git --version > git version 2.14.1 Using 2.20, git apply works fine for me but... If patch -p1 works, why not just using it then? It is always possible to check the patch for whitespaces or such with "git diff --check"

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread amul sul
On Mon, Dec 17, 2018 at 1:04 PM Michael Paquier wrote: > > On Mon, Dec 17, 2018 at 12:49:03PM +0530, amul sul wrote: > > On Mon, Dec 17, 2018 at 11:54 AM Michael Paquier wrote: > >> So this settles the argument that we had better not do anything before > >> v11. Switching the dump code to use co

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread Michael Paquier
On Mon, Dec 17, 2018 at 12:49:03PM +0530, amul sul wrote: > On Mon, Dec 17, 2018 at 11:54 AM Michael Paquier wrote: >> So this settles the argument that we had better not do anything before >> v11. Switching the dump code to use column numbers has not proved to be >> complicated as only the query

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread amul sul
Hi Michael, On Mon, Dec 17, 2018 at 11:54 AM Michael Paquier wrote: > [...] > So this settles the argument that we had better not do anything before > v11. Switching the dump code to use column numbers has not proved to be > complicated as only the query and some comments had to be tweaked. > At

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread amul sul
On Mon, Dec 17, 2018 at 11:54 AM Michael Paquier wrote: > > On Mon, Dec 17, 2018 at 12:24:15AM -0500, Tom Lane wrote: > > If we were to rename the "foo.expr" column at this point, > > and then dump and reload, the expression column in the > > second index would presumably acquire the name "expr" >

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread Michael Paquier
On Mon, Dec 17, 2018 at 12:24:15AM -0500, Tom Lane wrote: > If we were to rename the "foo.expr" column at this point, > and then dump and reload, the expression column in the > second index would presumably acquire the name "expr" > not "expr1", because "expr" would no longer be taken. > So if pg_d

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread Michael Paquier
On Mon, Dec 17, 2018 at 10:59:08AM +0530, amul sul wrote: > Patch is missing? Here you go. The patch is still using atttribute names, which is a bad idea ;) -- Michael diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 637c79af48..09e90ea62c 100644 --- a/src/bin/pg_dump/pg_d

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread amul sul
On Mon, Dec 17, 2018 at 10:44 AM Michael Paquier wrote: > > On Fri, Dec 14, 2018 at 08:08:45AM +, Amul Sul wrote: > > dump-alter-index-stats-v2.patch looks pretty much reasonable to me, passing > > on committer. > > > > The new status of this patch is: Ready for Committer > > Thanks Amul for

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread Tom Lane
Michael Paquier writes: > As Alexander and others state on this thread, it looks a bit weird to > use internally-produced attribute names in those SQL queries, which is > why the new grammar has been added. At the same time, it looks more > solid to me to represent the dumps with those column nam

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-16 Thread Michael Paquier
On Fri, Dec 14, 2018 at 08:08:45AM +, Amul Sul wrote: > dump-alter-index-stats-v2.patch looks pretty much reasonable to me, passing > on committer. > > The new status of this patch is: Ready for Committer Thanks Amul for the review. I got the occasion to look again at this patch, and I have

Re: ALTER INDEX ... ALTER COLUMN not present in dump

2018-12-14 Thread Amul Sul
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested dump-alter-index-stats-v2.patch looks pretty much reasonable to me, p