Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-19 Thread Simon Riggs
On Thu, Nov 10, 2011 at 8:17 PM, Christopher Browne cbbro...@gmail.com wrote: On Sun, Nov 6, 2011 at 2:28 AM, Jeroen Vermeulen j...@xs4all.nl wrote: On 2011-11-04 01:12, Alvaro Herrera wrote: I would like some opinions on the ideas on this patch, and on the patch itself.  If someone wants

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-19 Thread Simon Riggs
On Thu, Nov 3, 2011 at 6:12 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: So Noah Misch proposed using the FOR KEY SHARE syntax, and that's what I have implemented here.  (There was some discussion that instead of inventing new SQL syntax we could pass the necessary lock mode internally

Re: [HACKERS] Core Extensions relocation

2011-11-19 Thread Greg Smith
On 11/18/2011 03:36 PM, Josh Berkus wrote: Of course, packagers may then reasonably ask why that code is not just part of the core? Let me step back from the implementation ideas for a minute and talk about this, and how it ties into release philosophy. The extensions infrastructure for

Re: [HACKERS] foreign key locks, 2nd attempt

2011-11-19 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Thu, Nov 3, 2011 at 6:12 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: So Noah Misch proposed using the FOR KEY SHARE syntax, and that's what I have implemented here.  (There was some discussion that instead of inventing new SQL syntax we

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-19 Thread Tom Lane
Andres Freund and...@anarazel.de writes: Explain is just a vehicle here, I admit that. But on what else should I bolt it? If you don't like CREATE RULE, try having your test program send just Parse messages, and not Bind/Execute. I still dislike the idea of exposing a

Re: [HACKERS] COUNT(*) and index-only scans

2011-11-19 Thread Tom Lane
Thom Brown t...@linux.com writes: So is there a chance of getting bitmap index-only scans? Don't hold your breath. It seems like a huge increment of complexity for probably very marginal gains. The point of a bitmap scan (as opposed to regular indexscan) is to reduce heap accesses by combining

Re: [HACKERS] COUNT(*) and index-only scans

2011-11-19 Thread Thom Brown
On 19 November 2011 16:08, Tom Lane t...@sss.pgh.pa.us wrote: Thom Brown t...@linux.com writes: So is there a chance of getting bitmap index-only scans? Don't hold your breath.  It seems like a huge increment of complexity for probably very marginal gains.  The point of a bitmap scan (as

Re: [HACKERS] Core Extensions relocation

2011-11-19 Thread Greg Smith
On 11/18/2011 09:35 AM, Tom Lane wrote: Subdividing/rearranging contrib makes the packager's life more complicated, *and* makes his users' lives more complicated, if only because things aren't where they were before. It seems unlikely to happen, at least in the near term. Users are

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-19 Thread Andres Freund
On Saturday, November 19, 2011 04:52:10 PM Tom Lane wrote: Andres Freund and...@anarazel.de writes: Explain is just a vehicle here, I admit that. But on what else should I bolt it? If you don't like CREATE RULE, try having your test program send just Parse messages, and not Bind/Execute.

[HACKERS] Singleton range constructors versus functional coercion notation

2011-11-19 Thread Tom Lane
The singleton range constructors don't work terribly well. regression=# select int4range(42); -- ok int4range --- [42,43) (1 row) regression=# select int4range(null);-- not so ok int4range --- (1 row) regression=# select int4range('42');

Re: [HACKERS] RFC: list API / memory allocations

2011-11-19 Thread Stephen Frost
Andres, * Andres Freund (and...@anarazel.de) wrote: For that I added new functions/defines which allocate all the needed memory in one hunk: list_immutable_make$n(), List *list_new_immutable_n(NodeTag t, size_t n); List *list_make_n(NodeTag t, size_t n, ...); A while back, I posted a

Re: [HACKERS] RFC: list API / memory allocations

2011-11-19 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: Now, if you could do something that *doesn't* restrict what operations could be applied to the lists, that would be good. If the API is followed, I believe my previous patch works for everything, but it wasn't variable about the size of the new list.

Re: [HACKERS] EXPLAIN (plan off, rewrite off) for benchmarking

2011-11-19 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On Saturday, November 19, 2011 04:52:10 PM Tom Lane wrote: If you don't like CREATE RULE, try having your test program send just Parse messages, and not Bind/Execute. That sounds like a plan. Except that I would prefer to use pgbench. Well, how about

Re: [HACKERS] pgsql_fdw, FDW for PostgreSQL server

2011-11-19 Thread Kohei KaiGai
Hanada-san, I'm still under reviewing of your patch, so the comment is not overall, sorry. I'm not sure whether the logic of is_foreign_expr() is appropriate. It checks oid of the function within FuncExpr and OpExpr to disallow to push down user-defined functions. However, if a user-defined

Re: [HACKERS] Refactoring on DROP/ALTER SET SCHEMA/ALTER RENAME TO statement

2011-11-19 Thread Kohei KaiGai
2011/11/18 Robert Haas robertmh...@gmail.com: On Tue, Nov 15, 2011 at 4:43 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: Part-2) Groundworks on objectaddress.c This patch adds necessary groundworks for Part-3 and Part-4. It adds ObjectPropertyType of objectaddress.c index-oid and cache-id for

Re: [HACKERS] range_adjacent and discrete ranges

2011-11-19 Thread Jeff Davis
On Fri, 2011-11-18 at 14:47 -0500, Tom Lane wrote: Yeah, probably not. However, I don't like the idea of '(3,4)'::int4range throwing an error, as it currently does, because it seems to require the application to have quite a lot of knowledge of the range semantics to avoid having errors

Re: [HACKERS] Singleton range constructors versus functional coercion notation

2011-11-19 Thread Jeff Davis
On Sat, 2011-11-19 at 12:27 -0500, Tom Lane wrote: The singleton range constructors don't work terribly well. ... I don't immediately see a solution that's better than dropping the single-argument range constructors. We could change the name, I suppose, but that seems awkward. I'm hesitant to

Re: [HACKERS] Review for Add permission check on SELECT INTO

2011-11-19 Thread Kohei KaiGai
Thanks for your reviewing. The reason of this strange message was bug is the patch. CREATE TABLE public.copy1(a, b) AS SELECT * FROM public.test; ERROR:  whole-row update is not implemented When it constructs a fake RangeTblEntry, it marked modifiedCols for attribute 0 to (tupdesc-natts - 1),

Re: [HACKERS] Singleton range constructors versus functional coercion notation

2011-11-19 Thread Pavel Stehule
2011/11/19 Jeff Davis pg...@j-davis.com: On Sat, 2011-11-19 at 12:27 -0500, Tom Lane wrote: The singleton range constructors don't work terribly well. ... I don't immediately see a solution that's better than dropping the single-argument range constructors. We could change the name, I

Re: [HACKERS] Singleton range constructors versus functional coercion notation

2011-11-19 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Sat, 2011-11-19 at 12:27 -0500, Tom Lane wrote: I don't immediately see a solution that's better than dropping the single-argument range constructors. We could change the name, I suppose, but that seems awkward. Yeah, something like int4range_1(42)

Re: [HACKERS] range_adjacent and discrete ranges

2011-11-19 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: On Fri, 2011-11-18 at 14:47 -0500, Tom Lane wrote: Yeah, probably not. However, I don't like the idea of '(3,4)'::int4range throwing an error, as it currently does, because it seems to require the application to have quite a lot of knowledge of the range

Re: [HACKERS] SQLDA fix for ECPG

2011-11-19 Thread Boszormenyi Zoltan
Hi, 2011-11-17 14:53 keltezéssel, Michael Meskes írta: On Mon, Nov 14, 2011 at 09:06:30AM +0100, Boszormenyi Zoltan wrote: Yes, you are right. For timestamp and interval, the safe alignment is int64. Patch is attached. Applied, thanks. Michael thanks. Hopefully last turn in this topic.

Re: [HACKERS] range_adjacent and discrete ranges

2011-11-19 Thread Florian Pflug
On Nov19, 2011, at 22:03 , Tom Lane wrote: Jeff Davis pg...@j-davis.com writes: On Fri, 2011-11-18 at 14:47 -0500, Tom Lane wrote: Yeah, probably not. However, I don't like the idea of '(3,4)'::int4range throwing an error, as it currently does, because it seems to require the application to

Re: [HACKERS] Singleton range constructors versus functional coercion notation

2011-11-19 Thread Florian Pflug
On Nov19, 2011, at 21:57 , Tom Lane wrote: One thing I've been thinking for a bit is that for discrete ranges, I find the '[)' canonical form to be surprising/confusing. If we were to fix range_adjacent along the lines suggested by Florian, would it be practical to go over to '[]' as the

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-11-19 Thread Peter Geoghegan
On 19 November 2011 02:55, Robert Haas robertmh...@gmail.com wrote: Maybe we should look at trying to isolate that a bit better. Indeed. Fortunately, GCC has options to disable each optimisation. Here's potentially relevant flags that we're already implicitly using at -02:

Re: [HACKERS] Inlining comparators as a performance optimisation

2011-11-19 Thread Peter Geoghegan
On 20 November 2011 03:29, Peter Geoghegan pe...@2ndquadrant.com wrote: ./configure CFLAGS=-fno-inline -fno-inline-small-functions (I could have disabled more -02 optimisations, but this proved sufficient to make my point) I'll isolate this further to tuplesort.c soon, which ought to be a lot