Re: [HACKERS] Removing INNER JOINs

2014-11-30 Thread Mart Kelder
Hi David (and others), David Rowley wrote: Hi, Starting a new thread which continues on from http://www.postgresql.org/message-id/caaphdvoec8ygwoahvsri-84en2k0tnh6gpxp1k59y9juc1w...@mail.gmail.com To give a brief summary for any new readers: The attached patch allows for INNER JOINed

Re: [HACKERS] Removing INNER JOINs

2014-11-30 Thread David Rowley
On 30 November 2014 at 23:19, Mart Kelder m...@kelder31.nl wrote: I think performance can be greatly improved if the planner is able to use information based on the current data. I think these patches are just two examples of where assumptions during planning are usefull. I think there are

Re: [HACKERS] [BUGS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON

2014-11-30 Thread Andrew Dunstan
On 11/26/2014 11:48 AM, Andrew Dunstan wrote: On 11/26/2014 11:19 AM, Tom Lane wrote: bo...@edookit.com writes: The hstore_to_json_loose(hstore) produces an invalid JSON in the following case: SELECT hstore_to_json_loose(hstore(ARRAY ['name'], ARRAY ['1.'] :: TEXT [])) Output: {name: 1.}

Re: [HACKERS] [BUGS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON

2014-11-30 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: what do you want to do about this? In the back branches, exposing a function like this would be an API change, wouldn't it? Perhaps there we just need to pick up the 100 lines or so involved from json.c and copy them into hstore_io.c, suitably

Re: [HACKERS] Removing INNER JOINs

2014-11-30 Thread Tom Lane
David Rowley dgrowle...@gmail.com writes: I see this is quite a fundamental change to how things currently work and it could cause planning to take place during the execution of PREPAREd statements, which might not impress people too much, but it would certainly fix the weird anomalies that

Re: [HACKERS] TODO item: Accept aliases for values in ROW(...) constructor

2014-11-30 Thread Pavel Stehule
Hi Craig Is there agreement on proposed syntax ROW(x AS something, y AS somethingelse) ? I can start work on this topic this week. Regards Pavel 2014-11-25 2:33 GMT+01:00 Craig Ringer cr...@2ndquadrant.com: ROW(x AS something, y AS somethingelse) Apologies, it looks like Pavel

Re: [HACKERS] Removing INNER JOINs

2014-11-30 Thread David Rowley
On 1 December 2014 at 06:51, Tom Lane t...@sss.pgh.pa.us wrote: David Rowley dgrowle...@gmail.com writes: I see this is quite a fundamental change to how things currently work and it could cause planning to take place during the execution of PREPAREd statements, which might not impress

Re: [HACKERS] [BUGS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON

2014-11-30 Thread Andrew Dunstan
On 11/30/2014 11:45 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: what do you want to do about this? In the back branches, exposing a function like this would be an API change, wouldn't it? Perhaps there we just need to pick up the 100 lines or so involved from json.c and copy

Re: [HACKERS] [BUGS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON

2014-11-30 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: OK, here's the patch. Can we make IsValidJsonNumber() take a const char *? Also its comment should specify that it doesn't require nul-terminated input, if indeed it doesn't. Otherwise +1. regards, tom lane -- Sent via

Re: [HACKERS] [BUGS] BUG #12070: hstore extension: hstore_to_json_loose produces invalid JSON

2014-11-30 Thread Andrew Dunstan
On 11/30/2014 04:31 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: OK, here's the patch. Can we make IsValidJsonNumber() take a const char *? Also its comment should specify that it doesn't require nul-terminated input, if indeed it doesn't. Otherwise +1.

Re: [HACKERS] Selectivity estimation for inet operators

2014-11-30 Thread Tom Lane
Emre Hasegeli e...@hasegeli.com writes: Thanks. Overall, my impression of this patch is that it works very well. But damned if I understood *how* it works :-). There's a lot of statistics involved, and it's not easy to see why something is multiplied by something else. I'm adding comments as I

Re: [HACKERS] Doing better at HINTing an appropriate column within errorMissingColumn()

2014-11-30 Thread Peter Geoghegan
On Tue, Nov 25, 2014 at 4:13 PM, Peter Geoghegan p...@heroku.com wrote: If I don't hear anything in the next day or two, I'll more or less preserve aliases-related aspects of the patch. FYI, I didn't go ahead and work on this, because I thought that the thanksgiving holiday in the US probably

Re: [HACKERS] Buildfarm not happy with test module move

2014-11-30 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: All of the MSVC critters are failing at make check. Yeah, I noticed that, thanks. As far as I can see the only way to fix it is to install dummy_seclabel to run the core seclabel test. That doesn't seem smart; I think it'd be

Re: [HACKERS] 9.5: Better memory accounting, towards memory-bounded HashAgg

2014-11-30 Thread Peter Geoghegan
On Mon, Nov 17, 2014 at 11:39 PM, Jeff Davis pg...@j-davis.com wrote: I can also just move isReset there, and keep mem_allocated as a uint64. That way, if I find later that I want to track the aggregated value for the child contexts as well, I can split it into two uint32s. I'll hold off any

Re: [HACKERS] Proposal: Log inability to lock pages during vacuum

2014-11-30 Thread Jim Nasby
On 11/10/14, 7:52 PM, Tom Lane wrote: On the whole, I'm +1 for just logging the events and seeing what we learn that way. That seems like an appropriate amount of effort for finding out whether there is really an issue. Attached is a patch that does this. -- Jim Nasby, Data Architect, Blue

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2014-11-30 Thread Dilip kumar
On 24 November 2014 11:29, Amit Kapila Wrote, I think still some of the comments given upthread are not handled: a. About cancel handling Your Actual comment was -- One other related point is that I think still cancel handling mechanism is not completely right, code is doing that when there

[HACKERS] [PROTOCOL TODO] Permit streaming of unknown-length lob/clob (bytea,text,etc)

2014-11-30 Thread Craig Ringer
Hi all Currently the client must know the size of a large lob/clob field, like a 'bytea' or 'text' field, in order to send it to the server. This can force the client to buffer all the data before sending it to the server. It would be helpful if the v4 protocol permitted the client to specify