Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-14 Thread Michael Paquier
On Tue, Jul 14, 2015 at 1:42 AM, Heikki Linnakangas wrote: There was one bug in this patch: the COMMENT statement that was constructed didn't schema-qualify the relation, so if the ALTERed table was not in search_path, the operation would fail with a relation not found error (or add the

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-14 Thread Heikki Linnakangas
On 07/14/2015 10:29 AM, Michael Paquier wrote: On Tue, Jul 14, 2015 at 1:42 AM, Heikki Linnakangas wrote: I plan to commit the attached patches later today or tomorrow. But how do you feel about back-patching this? It should be possible to backpatch, although at a quick test it seems that there

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-13 Thread Heikki Linnakangas
On 07/08/2015 08:12 AM, Michael Paquier wrote: On Tue, Jul 7, 2015 at 6:24 PM, Petr Jelinek p...@2ndquadrant.com wrote: On 2015-07-04 13:45, Michael Paquier wrote: On Fri, Jul 3, 2015 at 11:59 PM, Petr Jelinek wrote: Well for indexes you don't really need to add the new AT command, as

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-07 Thread Petr Jelinek
On 2015-07-04 13:45, Michael Paquier wrote: On Fri, Jul 3, 2015 at 11:59 PM, Petr Jelinek wrote: Well for indexes you don't really need to add the new AT command, as IndexStmt has char *idxcomment which it will automatically uses as comment if not NULL. While I am not huge fan of the

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-07 Thread Michael Paquier
On Tue, Jul 7, 2015 at 6:24 PM, Petr Jelinek p...@2ndquadrant.com wrote: On 2015-07-04 13:45, Michael Paquier wrote: On Fri, Jul 3, 2015 at 11:59 PM, Petr Jelinek wrote: Well for indexes you don't really need to add the new AT command, as IndexStmt has char *idxcomment which it will

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-04 Thread Michael Paquier
On Fri, Jul 3, 2015 at 11:59 PM, Petr Jelinek wrote: Well for indexes you don't really need to add the new AT command, as IndexStmt has char *idxcomment which it will automatically uses as comment if not NULL. While I am not huge fan of the idxcomment it doesn't seem to be easy to remove it

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-03 Thread Michael Paquier
On Thu, Jul 2, 2015 at 11:16 PM, Petr Jelinek p...@2ndquadrant.com wrote: I was going through the code and have few comments: - Why do you change the return value of TryReuseIndex? Can't we use reuse the same OidIsValid(stmt-oldNode) check that ATExecAddIndex is doing instead? As pointed out

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-03 Thread Petr Jelinek
On 2015-07-03 15:50, Michael Paquier wrote: On Thu, Jul 2, 2015 at 11:16 PM, Petr Jelinek p...@2ndquadrant.com wrote: I was going through the code and have few comments: - Why do you change the return value of TryReuseIndex? Can't we use reuse the same OidIsValid(stmt-oldNode) check that

Re: [HACKERS] [BUGS] BUG #13126: table constraint loses its comment

2015-07-02 Thread Petr Jelinek
On 2015-05-27 15:10, Michael Paquier wrote: On Wed, Apr 29, 2015 at 1:30 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sun, Apr 26, 2015 at 6:05 AM, Tom Lane t...@sss.pgh.pa.us wrote: x...@resolvent.net writes: In some circumstances, the comment on a table constraint disappears.