Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-27 Thread Robert Haas
On Wed, Jun 22, 2011 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jun 22, 2011 at 12:51 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié jun 22 08:56:02 -0400 2011: Another option might be to leave heap_openrv() and

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-27 Thread Noah Misch
On Mon, Jun 27, 2011 at 01:28:30PM -0400, Robert Haas wrote: On Wed, Jun 22, 2011 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: I agree with you. ?If we had a whole pile of options it might be worth having heap_openrv() and heap_openrv_extended() so as not to complicate the simple

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-27 Thread Robert Haas
On Mon, Jun 27, 2011 at 2:59 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jun 27, 2011 at 01:28:30PM -0400, Robert Haas wrote: On Wed, Jun 22, 2011 at 1:36 PM, Robert Haas robertmh...@gmail.com wrote: I agree with you. ?If we had a whole pile of options it might be worth having

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-27 Thread Kohei KaiGai
The attached patch is rebased one towards the latest tree, using relation_openrv_extended(). Although it is not a matter in this patch itself, I found a problem on the upcoming patch that consolidate routines associated with DropStmt. Existing RemoveRelations() acquires a lock on the table owning

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-27 Thread Robert Haas
On Mon, Jun 27, 2011 at 4:40 PM, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached patch is rebased one towards the latest tree, using relation_openrv_extended(). Committed. Although it is not a matter in this patch itself, I found a problem on the upcoming patch that consolidate

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-23 Thread Kohei KaiGai
I revised my patch based on your there-is-no-try-v2.patch. It enabled to implement 'missing_ok' support without modification of orders to solve the object name and relation locking. Thanks, 2011/6/22 Robert Haas robertmh...@gmail.com: On Wed, Jun 22, 2011 at 12:51 PM, Alvaro Herrera

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-22 Thread Robert Haas
On Wed, Jun 22, 2011 at 6:18 AM, Noah Misch n...@leadboat.com wrote: On Tue, Jun 21, 2011 at 11:11:41PM -0400, Robert Haas wrote: On Tue, Jun 21, 2011 at 11:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Some of the refactoring you've done here seems

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-22 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Another option might be to leave heap_openrv() and relation_openrv() alone and add a missing_ok argument to try_heap_openrv() and try_relation_openrv(). +1 for that, although the try_ prefix might be inappropriate naming now; how about

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-22 Thread Alvaro Herrera
Excerpts from Robert Haas's message of mié jun 22 08:56:02 -0400 2011: Another option might be to leave heap_openrv() and relation_openrv() alone and add a missing_ok argument to try_heap_openrv() and try_relation_openrv(). Passing true would give the same behavior as presently; passing

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-22 Thread Robert Haas
On Wed, Jun 22, 2011 at 12:51 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of mié jun 22 08:56:02 -0400 2011: Another option might be to leave heap_openrv() and relation_openrv() alone and add a missing_ok argument to try_heap_openrv() and

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-21 Thread Robert Haas
On Sun, Jun 19, 2011 at 7:40 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: Sorry, the previous revision did not update regression test part towards the latest one. Some of the refactoring you've done here seems likely to break things, because you're basically making the relation locking happen

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-21 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: Some of the refactoring you've done here seems likely to break things, because you're basically making the relation locking happen later than it does not, and that's going to cause problems. get_object_address_relobject() is a particularly egregious

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-21 Thread Robert Haas
On Tue, Jun 21, 2011 at 11:04 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: Some of the refactoring you've done here seems likely to break things, because you're basically making the relation locking happen later than it does not, and that's going to cause

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-19 Thread Kohei KaiGai
Thanks for your review. 2011/6/19 Robert Haas robertmh...@gmail.com: On Tue, Jun 14, 2011 at 8:06 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached patch is a preparation to rework implementation of DROP statement using a common code. That intends to apply get_object_address() to

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-19 Thread Kohei KaiGai
Sorry, the previous revision did not update regression test part towards the latest one. 2011/6/19 Kohei KaiGai kai...@kaigai.gr.jp: Thanks for your review. 2011/6/19 Robert Haas robertmh...@gmail.com: On Tue, Jun 14, 2011 at 8:06 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached

Re: [HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-18 Thread Robert Haas
On Tue, Jun 14, 2011 at 8:06 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: The attached patch is a preparation to rework implementation of DROP statement using a common code. That intends to apply get_object_address() to resolve name of objects to be removed, and eventually minimizes the number

[HACKERS] [v9.2] DROP Reworks Part.0 - 'missing_ok' support of get_object_address

2011-06-14 Thread Kohei KaiGai
The attached patch is a preparation to rework implementation of DROP statement using a common code. That intends to apply get_object_address() to resolve name of objects to be removed, and eventually minimizes the number of places to put permission checks. Its first step is an enhancement of