Re: [HACKERS] JSON NULLs

2013-02-11 Thread Yeb Havinga
On 2013-02-10 16:03, Andrew Dunstan wrote: On 02/10/2013 05:43 AM, Yeb Havinga wrote: 3. I was wondering how to access the first author from this json snippet: { id: QZr82w_eSi8C, etag: KZ+JsrkCdqw, volumeInfo: { title: Heads Up Software Construction, authors: [ Dan Malone, Dave

Re: [HACKERS] Too frequent checkpoints ?

2013-02-11 Thread Pavan Deolasee
On Fri, Feb 8, 2013 at 10:25 PM, Fujii Masao masao.fu...@gmail.com wrote: . BTW, the cause of the problem is that the following sequences happens. 1. archive_timeout switches WAL file because checkpoint WAL record has has been written since last switch Thank you for explaining that. I

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-02-11 Thread Dean Rasheed
On 10 February 2013 12:37, Pavel Stehule pavel.steh...@gmail.com Here is my first draft. I've also attached the generated HTML page, because it's not so easy to read an SGML patch. nice I have only one point - I am think, so format function should be in table 9-6 - some small text with

Re: [HACKERS] Improving pgbench to log index creation time etc.

2013-02-11 Thread Andres Freund
On 2013-02-11 12:40:31 +0900, Tatsuo Ishii wrote: So I would like to propose to add new options to be used with pgbenh -i (initialize) mode: --log-index-creation-duration: log duration of index creation in seconds --log-vacuum-duration: log duration of vacuum in seconds What do you think?

Re: [HACKERS] Fwd: Successful post to pgsql-hackers

2013-02-11 Thread Magnus Hagander
On Mon, Feb 11, 2013 at 5:01 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Magnus Hagander escribió: On Sun, Feb 10, 2013 at 3:25 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I changed the defaults for new subscribers, and also the flags values for all existing subscribers,

Re: [HACKERS] Fwd: Successful post to pgsql-hackers

2013-02-11 Thread Alvaro Herrera
Magnus Hagander escribió: On Mon, Feb 11, 2013 at 5:01 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Magnus Hagander escribió: On Sun, Feb 10, 2013 at 3:25 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: I changed the defaults for new subscribers, and also the flags values

Re: [HACKERS] Fwd: Successful post to pgsql-hackers

2013-02-11 Thread Magnus Hagander
On Mon, Feb 11, 2013 at 2:44 PM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Magnus Hagander escribió: On Mon, Feb 11, 2013 at 5:01 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Magnus Hagander escribió: On Sun, Feb 10, 2013 at 3:25 AM, Alvaro Herrera alvhe...@2ndquadrant.com

Re: [HACKERS] unlogged tables vs. GIST

2013-02-11 Thread Heikki Linnakangas
On 11.02.2013 08:44, Jeevan Chalke wrote: Hi, Any review comments on this ? Sorry for the delay. I did some minor cleanup on this. I added code to pg_resetxlog and pg_controldata to reset / display the current unlogged LSN value. I moved the static counter, for temporary relations, back to

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund and...@2ndquadrant.com writes: On 2013-01-24 11:22:52 -0500, Tom Lane wrote: Say again? Surely the temp file is being written by whichever backend is executing SET PERSISTENT, and there could be more than one. Sure, but the patch

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Andres Freund
On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: 2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund and...@2ndquadrant.com writes: On 2013-01-24 11:22:52 -0500, Tom Lane wrote: Say again? Surely the temp file is being written by whichever backend is executing SET PERSISTENT,

[HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-01-26 13:46 keltezéssel, Robert Haas írta: On Thu, Jan 24, 2013 at 12:39 PM, Andres Freund and...@2ndquadrant.com wrote: More people seem to have voted for the single file approach but I still haven't understood why... Me neither. Having an include directory seems good, but I can't think

Re: [HACKERS] Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used

2013-02-11 Thread Pavel Stehule
optional argument from str to formatarg, since they are no longer necessarily strings. Regards, Dean format-width-20130211.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [HACKERS] Improving pgbench to log index creation time etc.

2013-02-11 Thread Tom Lane
Tatsuo Ishii is...@postgresql.org writes: Hi PostgreSQL hackers, I often need to calculate time to spend for index creation and vacuum to analyze PostgreSQL data load performance. Index creation and vacuum will take non trivial time for large scale data and it is important information of data

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: 2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund and...@2ndquadrant.com writes: On 2013-01-24 11:22:52 -0500, Tom Lane wrote: Say again? Surely the temp file is being written

Re: [HACKERS] performance regression in 9.2 CTE with SRF function

2013-02-11 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: no, there is strange estimation SubPlan 2 - CTE Scan on pl pl_1 (cost=0.00..468.59 rows=89000 width=4) (actual time=0.023..8.379 rows=566 loops=1000) Output: foo(pl_1.a) Nothing strange about it. 89 rows out from the underlying CTE (which

Re: [HACKERS] sql_drop Event Trigger

2013-02-11 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Robert, you specifically opposed to sql_drop and I just removed it from the patch. What do you think now? Also, should that be a follow-up patch to the current one for your reviewing purposes? Well, if it has a different firing point than

Re: [HACKERS] Fwd: Successful post to pgsql-hackers

2013-02-11 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: That said, I think that was pretty darn unfriendly to those who potentially changed their own configuration. E.g. all those who potentially set their ackpost to on intentionally years ago, have now lost that one... But it's clearly too late to do

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-11 Thread Vladimir Sitnikov
The thing is PostgeSQL JDBC driver should be able to parse sql in order to tell if specific question mark is a bind variable or it is inside string literal, or it is inside of some comment. I do not believe JDBC spec forces to treat all ? as bind placeholders. That's unusable. Oracle JDBC allows

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-11 Thread Tom Lane
Vladimir Sitnikov sitnikov.vladi...@gmail.com writes: The thing is PostgeSQL JDBC driver should be able to parse sql in order to tell if specific question mark is a bind variable or it is inside string literal, or it is inside of some comment. What's your point? Those cases don't have

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-11 Thread Seamus Abshere
On 2/11/13 11:30 AM, Tom Lane wrote: It would take extremely deep knowledge of SQL syntax for the driver to reliably tell the difference between a variable and an operator Yes, auto-detecting the difference between bind vars and operators would probably be even more difficult than providing

Re: [HACKERS] Department of Redundancy Department: makeNode(FuncCall) division

2013-02-11 Thread David Fetter
On Sun, Feb 10, 2013 at 10:09:19AM -0500, Tom Lane wrote: David Fetter da...@fetter.org writes: Per suggestions and lots of help from Andrew Gierth, please find attached a patch to clean up the call sites for FuncCall nodes, which I'd like to expand centrally rather than in each of the 37

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Josh Berkus
On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: 2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: 2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund and...@2ndquadrant.com writes: On 2013-01-24 11:22:52 -0500, Tom Lane wrote:

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Andres Freund
On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: 2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: 2013-01-24 18:02 keltezéssel, Tom Lane írta: Andres Freund and...@2ndquadrant.com

Re: [HACKERS] Alias hstore's ? to ~ so that it works with JDBC

2013-02-11 Thread Heikki Linnakangas
On 08.02.2013 19:41, Kris Jurka wrote: On Fri, 8 Feb 2013, Dave Cramer wrote: Would this be an postgresql specific escape sequence ? I don't think the spec allows for this does it ? Yes, this would be a postgresql jdbc driver specific escape. The spec doesn't have a concept of private

Re: [HACKERS] performance regression in 9.2 CTE with SRF function

2013-02-11 Thread Pavel Stehule
2013/2/11 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: no, there is strange estimation SubPlan 2 - CTE Scan on pl pl_1 (cost=0.00..468.59 rows=89000 width=4) (actual time=0.023..8.379 rows=566 loops=1000) Output: foo(pl_1.a) Nothing strange about it. 89

[HACKERS] send Describe Portal message in PQsendPrepare

2013-02-11 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. What is the reason why PQsendPrepare function does not send a Describe Portal message? Just as a proof of concept, I wrote a very simple patch, attached, and it *seems* to work. Sending a Describe Portal message, make it possible for

[HACKERS] parser_analyze freeing memory which is later referenced

2013-02-11 Thread Kevin Grittner
I'm using valgrind to find a problem with materialized views, and ran into this, which I have confirmed is present on the master branch as of 7803e9327db3788f68d820c19f4081afb79edd12. Memory freed here:    at 0x76E3AF: pfree (mcxt.c:677)    by 0x50861E: parse_analyze (analyze.c:105)    by

Re: [HACKERS] [PATCH] Add PQconninfoParseParams and PQconninfodefaultsMerge to libpq

2013-02-11 Thread Heikki Linnakangas
On 04.02.2013 17:32, Alvaro Herrera wrote: Phil Sorber wrote: On Mon, Feb 4, 2013 at 10:16 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Phil Sorber wrote: On Mon, Feb 4, 2013 at 9:13 AM, Alvaro Herreraalvhe...@2ndquadrant.com wrote: Uh, no existing code can use this new

Re: [HACKERS] send Describe Portal message in PQsendPrepare

2013-02-11 Thread Tom Lane
Manlio Perillo manlio.peri...@gmail.com writes: What is the reason why PQsendPrepare function does not send a Describe Portal message? That would add a round trip, no? Sending a Describe Portal message, make it possible for PQsendPrepare function to *return* a PGresult with more useful

Re: [HACKERS] [PATCH] Add PQconninfoParseParams and PQconninfodefaultsMerge to libpq

2013-02-11 Thread Phil Sorber
On Mon, Feb 11, 2013 at 4:19 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 04.02.2013 17:32, Alvaro Herrera wrote: Phil Sorber wrote: On Mon, Feb 4, 2013 at 10:16 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Phil Sorber wrote: On Mon, Feb 4, 2013 at 9:13 AM, Alvaro

Re: [HACKERS] palloc unification

2013-02-11 Thread Alvaro Herrera
Here's a more finalized version of this. There are two main interesting changes here: 1. postgres_fe.h includes common/fe_memutils.h This means all frontend programs get the #include without having to do it explicitely by themselves. postgres.h includes utils/palloc.h which I used as

Re: [HACKERS] palloc unification

2013-02-11 Thread Alvaro Herrera
Alvaro Herrera escribió: c. I added the MSVC bits. I tested that most of it works, but the various regress executables as well as zic failed to build due to lack of libpgcommon at link time. I think I fixed it; I'm waiting on new tests to run. (This patch is the fixed version).

Re: [HACKERS] parser_analyze freeing memory which is later referenced

2013-02-11 Thread Tom Lane
Kevin Grittner kgri...@ymail.com writes: I'm using valgrind to find a problem with materialized views, and ran into this, which I have confirmed is present on the master branch as of 7803e9327db3788f68d820c19f4081afb79edd12. Memory freed here: ... is later referenced at these places: [

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Craig Ringer
On 02/12/2013 03:24 AM, Andres Freund wrote: Well, several people (at least Tom, I, and I think Zoltan as well) think that the one-file approach is considerably more complex. Check http://www.postgresql.org/message-id/20130126162728.ga5...@awork2.anarazel.de and related messages for some of

Re: [HACKERS] BUG #7493: Postmaster messages unreadable in a Windows console

2013-02-11 Thread Noah Misch
On Sun, Feb 10, 2013 at 06:47:30PM -0500, Tom Lane wrote: Noah Misch n...@leadboat.com writes: Following some actual testing, I see that we treat postgresql.conf values as byte sequences; any reinterpretation as encoded text happens later. Hence, contrary to my earlier suspicion, your

Re: [HACKERS] BUG #7493: Postmaster messages unreadable in a Windows console

2013-02-11 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Sun, Feb 10, 2013 at 06:47:30PM -0500, Tom Lane wrote: The key problem, ISTM, is that it's not at all clear what encoding to expect the incoming data to be in. I'm concerned about trying to fix that by assuming it's in some platform encoding --- for one

Re: [HACKERS] BUG #7493: Postmaster messages unreadable in a Windows console

2013-02-11 Thread Greg Stark
On Sun, Feb 10, 2013 at 11:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: If we knew that postgresql.conf was stored in, say, UTF8, then it would probably be possible to perform encoding conversion to get string variables into the database encoding. Perhaps we should allow some magic syntax to

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Amit Kapila
On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote: On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: 2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100, Boszormenyi Zoltan wrote: 2013-01-24 18:02

Re: [HACKERS] Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]

2013-02-11 Thread Boszormenyi Zoltan
2013-02-12 04:54 keltezéssel, Amit Kapila írta: On Tuesday, February 12, 2013 12:54 AM Andres Freund wrote: On 2013-02-11 11:17:16 -0800, Josh Berkus wrote: On 02/11/2013 06:33 AM, Boszormenyi Zoltan wrote: 2013-02-11 15:25 keltezéssel, Andres Freund írta: On 2013-02-11 15:21:13 +0100,

Re: [HACKERS] [JDBC] JPA + enum == Exception

2013-02-11 Thread Craig Ringer
On 02/08/2013 12:55 PM, Tom Lane wrote: AFAIK this is just business as usual with JDBC: setString() implies that the parameter is of a string type. Well, it means that it's a type compatible with a java.lang.String . JDBC doesn't say much about the database-side type. It's my strong view that