Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-04 Thread Andrew Dunstan
On 11/03/2014 10:11 PM, Tom Lane wrote: Josh Berkusj...@agliodbs.com writes: On 11/02/2014 11:41 AM, Tom Lane wrote: Nothing that I recall at the moment, but there is certainly plenty of stuff of dubious quality in there. I'd argue that chkpass, intagg, intarray, isn, spi, and xml2 are all

[HACKERS] get_cast_func syscache utility function

2014-11-04 Thread Andrew Dunstan
here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb generators would also use it twice. I'd like to get this committed fairly quickly so I can

Re: [HACKERS] get_cast_func syscache utility function

2014-11-04 Thread Andrew Dunstan
On 11/04/2014 12:57 PM, Andrew Dunstan wrote: here's a patch for a utility function to look up the cast function for a from/to pair of types, as recently suggested by Alvaro. Although it only contains one use (in json.c), the upcoming jsonb generators would also use it twice. I'd like

Re: [HACKERS] COPY TO returning empty result with parallel ALTER TABLE

2014-11-04 Thread Andrew Dunstan
On 11/04/2014 01:51 PM, Tom Lane wrote: Bernd Helmle maili...@oopsware.de writes: --On 3. November 2014 18:15:04 +0100 Sven Wegener sven.wege...@stealer.net wrote: I've check git master and 9.x and all show the same behaviour. I came up with the patch below, which is against curent git

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-02 Thread Andrew Dunstan
On 11/02/2014 10:01 AM, Jaime Casanova wrote: El nov 2, 2014 7:54 AM, Andres Freund and...@2ndquadrant.com mailto:and...@2ndquadrant.com escribió: On 2014-11-01 16:59:35 -0700, Josh Berkus wrote: All, While there's argument about hash indexes, it looks like nobody minds if the

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-02 Thread Andrew Dunstan
On 11/02/2014 11:53 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 11/02/2014 10:01 AM, Jaime Casanova wrote: Not knowing how difficult it could be maybe a fair compromise is to move MONEY datatype to a contrib. And documenting its limitations. That's pretty much dead

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-02 Thread Andrew Dunstan
On 11/02/2014 02:41 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 11/02/2014 11:53 AM, Tom Lane wrote: Well, the OID compatibility issue could be dodged by saying that we can't do a pg_upgrade (in-place upgrade) of a database containing MONEY columns. In fact, we might

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-01 Thread Andrew Dunstan
On 11/01/2014 01:26 PM, Andres Freund wrote: On 2014-11-01 10:18:03 -0700, Josh Berkus wrote: On 10/31/2014 03:07 PM, Tom Lane wrote: I don't care one way or the other about the money type, but I will defend hash indexes, especially seeing that we've already added a pretty in-your-face

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-01 Thread Andrew Dunstan
On 11/01/2014 01:58 PM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-11-01 10:18:03 -0700, Josh Berkus wrote: Yes, and I'm arguing that is the wrong decision. If hash indexes are discouraged, then they shouldn't be in core in the first place. Last time we discussed

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-01 Thread Andrew Dunstan
On 11/01/2014 02:34 PM, Andres Freund wrote: Yeah, if we were trying to duplicate the behavior of indisvalid, there'd need to be a way to detect the invalid index at plan time and not use it. But I'm not sure that that's actually an improvement from the user's standpoint: what they'd see is

Re: [HACKERS] Let's drop two obsolete features which are bear-traps for novices

2014-11-01 Thread Andrew Dunstan
On 11/01/2014 02:39 PM, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: A REINDEX is imo unlikely to be acceptable. It takes long (why would you bother on a small table?) and locks the relation/indexes. I think the goalposts just took a vacation to Acapulco. What exactly do you

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-31 Thread Andrew Dunstan
On 10/30/2014 09:17 PM, Andres Freund wrote: On 2014-10-30 21:03:43 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-10-30 20:13:53 -0400, Tom Lane wrote: As I said upthread, that approach seems to me to be contrary to the project policy about how configure should

Re: [HACKERS] CREATE INDEX CONCURRENTLY?

2014-10-31 Thread Andrew Dunstan
On 10/31/2014 10:28 AM, Mark Woodward wrote: I have not kept up with PostgreSQL changes and have just been using it. A co-worker recently told me that you need to word CONCURRENTLY in CREATE INDEX to avoid table locking. I called BS on this because to my knowledge PostgreSQL does not lock

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-30 Thread Andrew Dunstan
On 10/30/2014 05:23 PM, Tom Lane wrote: I wrote: Yup, you read that right, it took 32 seconds to run those dozen utterly trivial tests. As far as I could tell by eyeball, pretty much all of the time went into test 11, which is odd since it seems not significantly different from the others. I

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-30 Thread Andrew Dunstan
On 10/30/2014 09:37 PM, Andres Freund wrote: On 2014-10-30 21:24:04 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-10-30 21:03:43 -0400, Tom Lane wrote: Meh. Right now, it's easy to dismiss these tests as unimportant, figuring that they play little part in

Re: [HACKERS] pg_dump/pg_restore seem broken on hamerkop

2014-10-29 Thread Andrew Dunstan
On 10/29/2014 12:26 AM, Tom Lane wrote: I wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: [Some more code and git-log reading later] I see that the %z is a very recent addition: it only got there as of commit ad5d46a449, of September 5th ... and now I also see that hamerkop's last

Re: [HACKERS] jsonb generator functions

2014-10-28 Thread Andrew Dunstan
On 10/27/2014 05:57 PM, Alvaro Herrera wrote: Andrew Dunstan wrote: This bit: +/* + * Determine how we want to render values of a given type in datum_to_jsonb. + * + * Given the datatype OID, return its JsonbTypeCategory, as well as the type's + * output function OID. If the returned

Re: [HACKERS] foreign data wrapper option manipulation during Create foreign table time?

2014-10-28 Thread Andrew Dunstan
On 10/28/2014 05:26 PM, Demai Ni wrote: hi, guys, I am looking for a couple pointers here about fdw, and how to change the option values during CREATE table time. I am using postgres-xc-1.2.1 right now. For example, it contains file_fdw, whose create-table-stmt looks like: CREATE FOREIGN

Re: [HACKERS] how to handle missing prove

2014-10-28 Thread Andrew Dunstan
On 10/28/2014 09:16 PM, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: Here is a patch to use missing to handle the case when prove is not present. Wouldn't it be easier to do what we do for Perl, viz in Makefile.global.in ifneq (@PERL@,) # quoted to protect pathname with

Re: [HACKERS] jsonb generator functions

2014-10-27 Thread Andrew Dunstan
On 10/15/2014 03:54 PM, Andrew Dunstan wrote: I checked a code, and I have only two small objection - a name jsonb_object_two_arg is not good - maybe json_object_keys_values ? It's consistent with the existing json_object_two_arg. In all cases I think I kept the names the same except

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-27 Thread Andrew Dunstan
On 10/27/2014 11:41 AM, Robert Haas wrote: On Sun, Oct 26, 2014 at 12:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: The larger issue though is that even with both the above things fixed, the TAP tests would still be an expensive no-op on the majority of buildfarm members. AFAICT, I do not own a

Re: [HACKERS] proposal: CREATE DATABASE vs. (partial) CHECKPOINT

2014-10-27 Thread Andrew Dunstan
On 10/27/2014 05:58 PM, Tomas Vondra wrote: On 27.10.2014 17:24, Heikki Linnakangas wrote: On 10/27/2014 03:46 PM, Tom Lane wrote: Heikki Linnakangas hlinnakan...@vmware.com writes: On 10/27/2014 03:21 PM, Tomas Vondra wrote: Thinking about this a bit more, do we really need a full

Re: [HACKERS] proposal: CREATE DATABASE vs. (partial) CHECKPOINT

2014-10-27 Thread Andrew Dunstan
On 10/27/2014 07:01 PM, Andres Freund wrote: On 2014-10-27 18:57:27 -0400, Andrew Dunstan wrote: On 10/27/2014 05:58 PM, Tomas Vondra wrote: On 27.10.2014 17:24, Heikki Linnakangas wrote: I'm also thinking that for wal_level=archive and large databases, this won't really eliminate

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-26 Thread Andrew Dunstan
On 10/07/2014 01:57 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I don't much like the idea of doing an install/initdb/start for every directory in src/bin, though. Can't we at least manage a single installation directory for all these? Peter had a patch to eliminate

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 12:29 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 10/07/2014 01:57 PM, Tom Lane wrote: Peter had a patch to eliminate the overhead of multiple subinstalls; not sure where that stands, but presumably it would address your issue. Is there any progress

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/16/2014 04:12 PM, Pavel Stehule wrote: 1. missing documentation 2. I miss more comments related to this functions. This code is relative simple, but some more explanation can be welcome. 3. why these functions are marked as stable? New patch: Docs added, functions marked

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 03:50 PM, Pavel Stehule wrote: Hi I have a question, what is expected result of null strip of {a: {b: null, c, null} } ? Please remember not to top-post. The above is not legal json, so the answer would be an error. cheers andrew -- Sent via pgsql-hackers mailing list

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 04:14 PM, Thom Brown wrote: On 26 October 2014 20:07, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 10/26/2014 03:50 PM, Pavel Stehule wrote: Hi I have a question, what is expected result of null strip of {a: {b

Re: [HACKERS] strip nulls functions for json and jsonb

2014-10-26 Thread Andrew Dunstan
On 10/26/2014 04:22 PM, Pavel Stehule wrote: 2014-10-26 21:18 GMT+01:00 Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net: On 10/26/2014 04:14 PM, Thom Brown wrote: On 26 October 2014 20:07, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net

Re: [HACKERS] idea: allow AS label inside ROW constructor

2014-10-23 Thread Andrew Dunstan
On 10/23/2014 09:27 AM, Merlin Moncure wrote: On Thu, Oct 23, 2014 at 4:34 AM, Pavel Stehule pavel.steh...@gmail.com wrote: Hi here is a prototype postgres=# select row_to_json(row(10 as A, row(30 as c, 20 AS B) as x)); row_to_json --

Re: [HACKERS] idea: allow AS label inside ROW constructor

2014-10-23 Thread Andrew Dunstan
On 10/23/2014 09:57 AM, Florian Pflug wrote: On Oct23, 2014, at 15:39 , Andrew Dunstan and...@dunslane.net wrote: On 10/23/2014 09:27 AM, Merlin Moncure wrote: On Thu, Oct 23, 2014 at 4:34 AM, Pavel Stehule pavel.steh...@gmail.com wrote: postgres=# select row_to_json(row(10 as A, row(30 as c

Re: [HACKERS] idea: allow AS label inside ROW constructor

2014-10-23 Thread Andrew Dunstan
On 10/23/2014 11:36 AM, David G Johnston wrote: Andrew Dunstan wrote On 10/23/2014 09:57 AM, Florian Pflug wrote: On Oct23, 2014, at 15:39 , Andrew Dunstan lt; andrew@ gt; wrote: On 10/23/2014 09:27 AM, Merlin Moncure wrote: On Thu, Oct 23, 2014 at 4:34 AM, Pavel Stehule lt; pavel.stehule

Re: [HACKERS] Trailing comma support in SELECT statements

2014-10-20 Thread Andrew Dunstan
On 10/20/2014 11:59 AM, David E. Wheeler wrote: On Oct 18, 2014, at 7:06 PM, Jim Nasby jim.na...@bluetreble.com wrote: Yes. The only case I can think of where we wouldn't want this is COPY. BTW, this should also apply to delimiters other than commas; for example, some geometry types use ;

[HACKERS] json function volatility

2014-10-17 Thread Andrew Dunstan
Following up something Pavel wrote, I notice that json_agg() and json_object_agg() are both marked as immutable, even though they invoke IO functions, while json_object is marked stable, even though it does not, and can probably be marked as immutable. Mea maxima culpa. I'm not sure what we

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-10-15 Thread Andrew Dunstan
On 10/15/2014 01:53 AM, Craig Ringer wrote: On 10/15/2014 12:53 PM, Noah Misch wrote: Windows Server 2003 isn't even EOL yet. I'd welcome a buildfarm member with that OS and a modern toolchain. It's possible to run multiple buildfarm animals on a single Windows instance, each with a

Re: [HACKERS] jsonb generator functions

2014-10-15 Thread Andrew Dunstan
On 10/15/2014 07:38 AM, Pavel Stehule wrote: 2014-10-13 17:22 GMT+02:00 Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net: On 10/13/2014 09:37 AM, Andrew Dunstan wrote: On 09/26/2014 04:54 PM, Andrew Dunstan wrote: Here is a patch for the generator

Re: [HACKERS] jsonb generator functions

2014-10-15 Thread Andrew Dunstan
On 10/15/2014 03:54 PM, I wrote: On 10/15/2014 07:38 AM, Pavel Stehule wrote: I checked a code, and I have only two small objection - a name jsonb_object_two_arg is not good - maybe json_object_keys_values ? It's consistent with the existing json_object_two_arg. In all cases I think I

Re: [HACKERS] jsonb generator functions

2014-10-15 Thread Andrew Dunstan
On 10/15/2014 05:47 PM, Alvaro Herrera wrote: Andrew Dunstan wrote: If we really want to change the name of json_object_two_arg, it would probably be best to change it NOW in 9.4 before it gets out into a production release at all. Doesn't it require initdb? If so, I think it's too late now

Re: [HACKERS] narwhal and PGDLLIMPORT

2014-10-14 Thread Andrew Dunstan
On 10/14/2014 06:44 PM, Dave Page wrote: On Tue, Oct 14, 2014 at 11:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: It seems we left this in broken state. Do we need to do more here to fix narwhal, or do we want to retire narwhal now? Something

Re: [HACKERS] jsonb generator functions

2014-10-13 Thread Andrew Dunstan
On 09/26/2014 04:54 PM, Andrew Dunstan wrote: Here is a patch for the generator and aggregate functions for jsonb that we didn't manage to get done in time for 9.4. They are all equivalents of the similarly names json functions. Included are to_jsonb jsonb_build_object

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-10-13 Thread Andrew Dunstan
On 10/13/2014 06:41 AM, Pavel Stehule wrote: Hi I am working on review of this patch. The patch attached to the message you are replying to was never intended to be reviewed. It was only given by way of illustration of a technique. The original patch to be reviewed is on the message

Re: [HACKERS] jsonb generator functions

2014-10-13 Thread Andrew Dunstan
On 10/13/2014 09:37 AM, Andrew Dunstan wrote: On 09/26/2014 04:54 PM, Andrew Dunstan wrote: Here is a patch for the generator and aggregate functions for jsonb that we didn't manage to get done in time for 9.4. They are all equivalents of the similarly names json functions. Included

Re: [HACKERS] Missing IPv6 for pgbuildfarm.org

2014-10-13 Thread Andrew Dunstan
On 07/10/2014 09:15 AM, Andrew Dunstan wrote: On 07/02/2014 05:08 AM, Torsten Zuehlsdorff wrote: Hello, i've tried to setup a FreeBSD 10 machine as buildfarm-member. But it's an IPv6 only machine and there is no IPv6 for the homepage. Can anyone add support for IPv6 to it? I'm looking

Re: [HACKERS] Context lenses to set/get values in json values.

2014-10-08 Thread Andrew Dunstan
On 10/08/2014 04:38 AM, Paweł Cesar Sanjuan Szklarz wrote: Hello. I am interested in the json type on postgresql. I would like to implement additional operations on the json structure that may extract/insert table like information from the json tree structure. I have a implementation on

Re: [HACKERS] Context lenses to set/get values in json values.

2014-10-08 Thread Andrew Dunstan
On 10/08/2014 12:13 PM, Paweł Cesar Sanjuan Szklarz wrote: I don't think we need to import Mongo type notation here. But there is probably a good case for some functions like: json_table_agg(anyrecord) - json which would work like json_agg() but would return an array of

Re: [HACKERS] Context lenses to set/get values in json values.

2014-10-08 Thread Andrew Dunstan
On 10/08/2014 02:04 PM, Thom Brown wrote: There is work already being done on providing update operations. I've been looking out for that. Has there been a discussion on how that would look yet that you could point me to? https://github.com/erthalion/jsonbx Note that a) it's an

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-07 Thread Andrew Dunstan
On 10/07/2014 12:15 AM, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Oct 6, 2014 at 8:15 PM, Peter Eisentraut pete...@gmx.net wrote: The TAP tests are arguably already much easier to debug than pg_regress ever was. Well, maybe. I wasn't able, after about 5 minutes of

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-07 Thread Andrew Dunstan
On 10/07/2014 09:53 AM, Andrew Dunstan wrote: On 10/07/2014 12:15 AM, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Mon, Oct 6, 2014 at 8:15 PM, Peter Eisentraut pete...@gmx.net wrote: The TAP tests are arguably already much easier to debug than pg_regress ever was. Well

Re: [HACKERS] Trailing comma support in SELECT statements

2014-10-03 Thread Andrew Dunstan
On 10/03/2014 12:20 PM, Bruce Momjian wrote: On Sun, Sep 28, 2014 at 01:42:46PM +0200, Bogdan Pilch wrote: Hi, I have created a small patch to postgres source (in particular the psql part of it) that accepts trailing comma at the end of list in SELECT statement. The idea is to be able to say

[HACKERS] strip nulls functions for json and jsonb

2014-10-03 Thread Andrew Dunstan
As discussed recently, here is an undocumented patch for json_strip_nulls and jsonb_strip_nulls. cheers andrew diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c index 2d00dbe..e9636d8 100644 --- a/src/backend/utils/adt/jsonfuncs.c +++

Re: [HACKERS] json (b) and null fields

2014-09-29 Thread Andrew Dunstan
On 09/29/2014 10:38 AM, Robert Haas wrote: On Sat, Sep 27, 2014 at 11:00 PM, Andrew Dunstan and...@dunslane.net wrote: On 09/27/2014 10:52 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 09/27/2014 06:27 PM, Tom Lane wrote: So my vote is for a separate function

Re: [HACKERS] json (b) and null fields

2014-09-29 Thread Andrew Dunstan
On 09/29/2014 04:32 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 09/29/2014 04:14 PM, Tom Lane wrote: More to the point, the way to fix any concerns about double parsing is to create row_to_jsonb(), not to plaster a bunch of options on row_to_json(). row_to_jsonb would

Re: [HACKERS] json (b) and null fields

2014-09-27 Thread Andrew Dunstan
On 09/27/2014 08:00 AM, Stephen Frost wrote: Andrew, all, * Andrew Dunstan (and...@dunslane.net) wrote: I should have been paying a bit more attention to the recent work on adding an ignore_nulls option to row_to_json(). Here are some belated thought. I apologize to Pavel and Stephen

Re: [HACKERS] json (b) and null fields

2014-09-27 Thread Andrew Dunstan
On 09/27/2014 06:27 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 09/27/2014 08:00 AM, Stephen Frost wrote: Yeah, I don't see adding this option to all json generator functions as making a lot of sense but rather just to the select few things which it really makes sense

[HACKERS] json (b) and null fields

2014-09-26 Thread Andrew Dunstan
I should have been paying a bit more attention to the recent work on adding an ignore_nulls option to row_to_json(). Here are some belated thought. I apologize to Pavel and Stephen for not having commented earlier. I think this is really a bandaid, and it will fail to catch lots of cases.

[HACKERS] jsonb generator functions

2014-09-26 Thread Andrew Dunstan
Here is a patch for the generator and aggregate functions for jsonb that we didn't manage to get done in time for 9.4. They are all equivalents of the similarly names json functions. Included are to_jsonb jsonb_build_object jsonb_build_array jsonb_object jsonb_agg

Re: [HACKERS] jsonb generator functions

2014-09-26 Thread Andrew Dunstan
On 09/26/2014 05:00 PM, Peter Geoghegan wrote: On Fri, Sep 26, 2014 at 1:54 PM, Andrew Dunstan and...@dunslane.net wrote: Here is a patch for the generator and aggregate functions for jsonb that we didn't manage to get done in time for 9.4. That's cool, but I hope someone revisits adding

[HACKERS] json_object_agg return on no rows

2014-09-24 Thread Andrew Dunstan
Probably due to an oversight on my part, json_object_agg currently returns a json object with no fields rather than NULL, which the docs say it will, and which would be consistent with all other aggregates except count(). I don't think we ever discussed this, so it's probably just a slip up.

Re: [HACKERS] proposal: rounding up time value less than its unit.

2014-09-23 Thread Andrew Dunstan
On 09/23/2014 10:29 AM, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: Three people have voted for making it an *error* to supply a value that needs to be rounded, instead of changing the rounding behavior. Votes or no votes, that's a horrible idea; it breaks the design goal that

Re: [HACKERS] RLS feature has been committed

2014-09-23 Thread Andrew Dunstan
On 09/23/2014 11:19 AM, Robert Haas wrote: On Tue, Sep 23, 2014 at 11:16 AM, Dave Page dp...@pgadmin.org wrote: Regardless of what Robert may feel, review should only generally be *expected* during a commitfest, but it can be done at any time. Committers are free to commit at any time. The

Re: [HACKERS] JsonbValue to Jsonb conversion

2014-09-23 Thread Andrew Dunstan
On 09/23/2014 12:23 PM, Dmitry Dolgov wrote: Hi all, I'm faced with some troubles about the jsonb implementation, and I hope I'll get little advice =) If I understand correctly, an abstract function for jsonb modification should have the following stages: Jsonb - JsonbValue - Modification

Re: [HACKERS] Help to startup

2014-09-20 Thread Andrew Dunstan
On 09/16/2014 01:51 PM, Tapan Halani wrote: Hello everyone..i am new to PostgreSQL project. I had prior experience with sql+ , with oracle 11g database server. Kindly help me grasp more about the project. The first thing you need to do is learn to ask your question in the right forum.

Re: [HACKERS] Should we excise the remnants of borland cc support?

2014-09-20 Thread Andrew Dunstan
On 09/20/2014 09:24 AM, Andres Freund wrote: Hi, At the moment there's some rememnants of support for borland CC. I don't believe it's likely that any of it still works. I can't remember ever seing a buildfarm animal running it either - not surprising it's ~15 years since the last release.

Re: [HACKERS] Anonymous code block with parameters

2014-09-18 Thread Andrew Dunstan
On 09/18/2014 07:40 AM, Andres Freund wrote: On 2014-09-17 22:17:22 +0200, Pavel Stehule wrote: 2014-09-17 22:07 GMT+02:00 Vik Fearing vik.fear...@dalibo.com: On 09/16/2014 10:09 AM, Heikki Linnakangas wrote: On 09/16/2014 10:57 AM, Craig Ringer wrote: On 09/16/2014 03:15 PM, Pavel Stehule

Re: [HACKERS] [Windows,PATCH] Use faster, higher precision timer API

2014-09-17 Thread Andrew Dunstan
On 09/17/2014 08:27 AM, Craig Ringer wrote: Hi all Attached is a patch to switch 9.5 over to using the GetSystemTimeAsFileTime call instead of separate GetSystemTime and SystemTimeToFileTime calls. This patch the first step in improving PostgreSQL's support for Windows high(er) resolution

Re: [HACKERS] Windows exit code 128 ... it's baaack

2014-09-17 Thread Andrew Dunstan
On 04/07/2014 10:26 AM, Andres Freund wrote: On 2014-04-05 11:05:09 -0400, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2014-02-27 19:14:13 -0500, Tom Lane wrote: I looked at the postmaster log for the ongoing issue on narwhal (to wit, that the contrib/dblink test dies the

Re: [HACKERS] [Windows,PATCH] Use faster, higher precision timer API

2014-09-17 Thread Andrew Dunstan
On 09/17/2014 12:51 PM, Andres Freund wrote: On 2014-09-17 11:19:36 -0400, Andrew Dunstan wrote: On 09/17/2014 08:27 AM, Craig Ringer wrote: Hi all Attached is a patch to switch 9.5 over to using the GetSystemTimeAsFileTime call instead of separate GetSystemTime and SystemTimeToFileTime

[HACKERS] Re: proposal: ignore null fields in not relation type composite type based constructors

2014-09-11 Thread Andrew Dunstan
On 09/11/2014 08:29 AM, Stephen Frost wrote: * Pavel Stehule (pavel.steh...@gmail.com) wrote: Can I help with something, it is there some open question? I had been hoping for a more definitive answer regarding this option for array_to_json, or even a comment about the change to row_to_json.

Re: [HACKERS] Problems with config.php and non default ports (postgresql - sugarcrm)

2014-09-09 Thread Andrew Dunstan
On 09/08/2014 05:27 PM, Bianca Santana Espichicoquez wrote: Hello, I've a problem, we're using sugarcrm, and we have a database postgresql, but not in the default port, so, when I try to connect after I put the port in the db_port parameter, but seems like he not recognized, because still

Re: [HACKERS] PL/pgSQL 2

2014-09-05 Thread Andrew Dunstan
On 09/05/2014 12:37 PM, Merlin Moncure wrote: On Thu, Sep 4, 2014 at 6:40 PM, Florian Pflug f...@phlo.org wrote: Cost of hidden IO cast is negative too. If we can change it, then we can increase a sped. But the whole power of PL/pgSQL comes from the fact that it allows you to use the full set

Re: [HACKERS] PL/pgSQL 2

2014-09-02 Thread Andrew Dunstan
On 09/02/2014 05:44 AM, Álvaro Hernández Tortosa wrote: On 02/09/14 11:34, Mark Kirkwood wrote: On 02/09/14 21:25, Álvaro Hernández Tortosa wrote: On 02/09/14 05:24, Craig Ringer wrote: I couldn't disagree more. If we were to implement anything, it'd be PL/PSM

Re: [HACKERS] PL/pgSQL 2

2014-09-02 Thread Andrew Dunstan
On 09/02/2014 08:41 AM, Ryan Pedela wrote: If PL/Javascript is a serious consideration, how will int64 and numeric be handled? Please don't top-post on the PostgreSQL lists. See http://idallen.com/topposting.html Unfortunately, I think the short answer is not very well. In theory we

Re: [HACKERS] PL/pgSQL 2

2014-09-02 Thread Andrew Dunstan
On 09/02/2014 09:08 AM, Pavel Stehule wrote: JavaScript would actually be quite a good alternative. However, using it involves something others have objected to, namely calling SQL via a function call. It's true that plpgsql lets you call SQL commands without explicitly

Re: [HACKERS] PL/pgSQL 2

2014-09-02 Thread Andrew Dunstan
On 09/02/2014 12:12 PM, Joel Jacobson wrote: On Tue, Sep 2, 2014 at 6:03 PM, Heikki Linnakangas hlinnakan...@vmware.com wrote: I think that would actually be a good way to enforce the rule that an UPDATE only updates a single row. Just put a ASSERT ROW_COUNT=1; after the update. So instead of

Re: [HACKERS] PL/pgSQL 2

2014-09-02 Thread Andrew Dunstan
On 09/02/2014 06:50 PM, Jan Wieck wrote: On 09/02/2014 06:41 PM, Joshua D. Drake wrote: On 09/02/2014 02:47 PM, Álvaro Hernández Tortosa wrote: Yeah, we differ there. I think having an Oracle compatibility layer in PostgreSQL would be the-next-big-thing we could have. Oracle is has

Re: [HACKERS] PL/pgSQL 2

2014-09-01 Thread Andrew Dunstan
On 09/01/2014 08:09 PM, Neil Tiffin wrote: On Sep 1, 2014, at 10:45 AM, Tom Lane t...@sss.pgh.pa.us wrote: What is actually being proposed, AFAICS, is a one-shot fix for a bunch of unfortunate choices. That might be worth doing, but let's not fool ourselves about whether it’s one-shot or

Re: [HACKERS] Removing dependency to wsock32.lib when compiling code on WIndows

2014-08-29 Thread Andrew Dunstan
On 08/29/2014 10:15 AM, Noah Misch wrote: On Thu, Aug 21, 2014 at 11:29:31PM -0400, Noah Misch wrote: On Thu, Aug 21, 2014 at 09:18:22AM -0400, Andrew Dunstan wrote: What's happening about this? Buildfarm animal jacana is consistently red because of this. If nobody plans to do

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-22 Thread Andrew Dunstan
On 08/22/2014 02:42 PM, Greg Stark wrote: On Fri, Aug 22, 2014 at 7:02 PM, Tom Lane t...@sss.pgh.pa.us wrote: So the proposal you are pushing is going to result in seriously teeing off some fraction of our userbase; and the argument why that would be acceptable seems to boil down to I think

Re: [HACKERS] Removing dependency to wsock32.lib when compiling code on WIndows

2014-08-21 Thread Andrew Dunstan
On 08/15/2014 11:00 PM, Noah Misch wrote: On Fri, Aug 15, 2014 at 12:49:36AM -0700, Michael Paquier wrote: Btw, how do you determine if MSVC is using HAVE_GETADDRINFO? Is it decided by the inclusion of getaddrinfo.c in @pgportfiles of Mkvdbuild.pm? src/include/pg_config.h.win32 dictates it,

Re: [HACKERS] WIP Patch for GROUPING SETS phase 1

2014-08-21 Thread Andrew Dunstan
On 08/21/2014 02:48 PM, Merlin Moncure wrote: Basically, I'm afraid that unilaterally renaming cube is going to break enough applications that there will be more people who flat out don't want this patch than there will be who get benefit from it, and we end up voting to revert the feature

[HACKERS] New PostgreSQL buildfarm client release 4.14 - bug fix for MSVC

2014-08-19 Thread Andrew Dunstan
There is a new release - version 4.14 - of the buildfarm client, now available at http://www.pgbuildfarm.org/downloads/releases/build-farm-4_14.tgz The only change of note is that a bug which only affects MSVC clients (such that the client will not complete a run) and is present in releases

Re: [HACKERS] Why not ISO 8601 format for date values rendered into JSON?

2014-08-17 Thread Andrew Dunstan
On 08/17/2014 08:42 PM, Tom Lane wrote: I was just going over the release notes, and noticed the bit about timestamp and timestamptz now being rendered in a fixed ISO-8601-compliant format rather than whatever random DateStyle is in use. That's fine, but I wonder why the same approach wasn't

Re: [HACKERS] Why not ISO 8601 format for date values rendered into JSON?

2014-08-17 Thread Andrew Dunstan
On 08/17/2014 09:53 PM, Tom Lane wrote: OK. I think I can fix it, if you don't have time. [offlist] Thanks. FYI I am still recovering from treatment for prostate cancer I had not long after pgcon ... it's taken more out of me that I expected, so time is

Re: [HACKERS] Why not ISO 8601 format for date values rendered into JSON?

2014-08-17 Thread Andrew Dunstan
On 08/17/2014 10:50 PM, Andrew Dunstan wrote: On 08/17/2014 09:53 PM, Tom Lane wrote: OK. I think I can fix it, if you don't have time. [offlist] Thanks. FYI I am still recovering from treatment for prostate cancer I had not long after pgcon ... it's taken more out of me that I

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-13 Thread Andrew Dunstan
On 08/13/2014 09:01 PM, Tom Lane wrote: I wrote: That's a fair question. I did a very very simple hack to replace the item offsets with item lengths -- turns out that that mostly requires removing some code that changes lengths to offsets ;-). I then loaded up Larry's example of a

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-08 Thread Andrew Dunstan
On 08/07/2014 11:17 PM, Tom Lane wrote: I looked into the issue reported in bug #11109. The problem appears to be that jsonb's on-disk format is designed in such a way that the leading portion of any JSON array or object will be fairly incompressible, because it consists mostly of a

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-08 Thread Andrew Dunstan
On 08/08/2014 11:18 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 08/07/2014 11:17 PM, Tom Lane wrote: I looked into the issue reported in bug #11109. The problem appears to be that jsonb's on-disk format is designed in such a way that the leading portion of any JSON

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-08 Thread Andrew Dunstan
On 08/08/2014 12:04 PM, John W Higgins wrote: Would an answer be to switch the location of the jsonb header data to the end of the field as opposed to the beginning of the field? That would allow pglz to see what it wants to see early on and go to work when possible? Add an offset at the

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-08 Thread Andrew Dunstan
On 08/08/2014 11:54 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: On 08/08/2014 11:18 AM, Tom Lane wrote: That's not really the issue here, I think. The problem is that a relatively minor aspect of the representation, namely the choice to store a series of offsets rather

Re: [HACKERS] jsonb format is pessimal for toast compression

2014-08-08 Thread Andrew Dunstan
On 08/08/2014 08:45 PM, Tom Lane wrote: Perhaps another options would be a new storage type which basically says just compress it, no matter what? We'd be able to make that the default for jsonb columns too, no? Meh. We could do that, but it would still require adding arguments to

Re: [HACKERS] New developer TODO suggestions

2014-07-30 Thread Andrew Dunstan
On 07/29/2014 10:43 AM, Bruce Momjian wrote: * A function that converts a json array to a PostgreSQL array of a given type if all json members are compatible with the type * Expanding the set of json/jsonb operations to introduce features that people are used to from jquery, mongo, etc.

Re: [HACKERS] New developer TODO suggestions

2014-07-30 Thread Andrew Dunstan
On 07/30/2014 06:11 PM, Peter Geoghegan wrote: On Wed, Jul 30, 2014 at 2:37 PM, Andrew Dunstan and...@dunslane.net wrote: Both these might be possible. I am not planning on doing them, at least. My current json plans for 9.5 are limited to implementing jsonb equivalents of those json functions

Re: [HACKERS] building pdfs

2014-07-28 Thread Andrew Dunstan
On 07/27/2014 11:28 AM, Tom Lane wrote: Personally I find the PDF docs to be an anachronism: surely nobody is printing them on dead trees any more, and for on-computer usage, what do they offer that the HTML format doesn't? So I'm unexcited about making them slightly prettier.

Re: [HACKERS] Reminder: time to stand down from 8.4 maintenance

2014-07-28 Thread Andrew Dunstan
I have removed it from the buildfarm server's branches_of_interest.txt. buildfarm members that rely in this file won't need to take any action, except possibly to clean up their build root. cheers andrew On 07/28/2014 07:41 PM, Tom Lane wrote: PG 8.4.x is EOL as of last week's releases,

[HACKERS] building pdfs

2014-07-26 Thread Andrew Dunstan
Is there any standard set of packages on any supported platform that will allow for building the doc PDFs? So far I have not found one on either Fedora 20 or Ubuntu 14.04, but maybe I'm missing something. I am looking at adding a buildfarm facility to build the docs, but I'm not prepared to

Re: [HACKERS] building pdfs

2014-07-26 Thread Andrew Dunstan
On 07/26/2014 02:22 PM, Andres Freund wrote: On 2014-07-26 14:14:15 -0400, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Is there any standard set of packages on any supported platform that will allow for building the doc PDFs? So far I have not found one on either Fedora 20

Re: [HACKERS] building pdfs

2014-07-26 Thread Andrew Dunstan
On 07/26/2014 06:44 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Yes, I did that and generated a PDF, but I got an enormous number of errors or warnings. See https://www.dropbox.com/s/9n4hhijin3qn8mw/postgres-US.log for example. If they're things like overfull hbox from

Re: [HACKERS] PDF builds broken again

2014-07-23 Thread Andrew Dunstan
On 07/23/2014 06:31 AM, Magnus Hagander wrote: Do we actually have any buildfarm boxes building the PDFs? And if so, any idea why they didn't catch it? AFAIK, nobody's ever asked for such a thing. The docs optional step just builds the default docs target, which is simply the HTML docs.

Re: [HACKERS] Some bogus results from prairiedog

2014-07-22 Thread Andrew Dunstan
On 07/22/2014 12:24 AM, Tom Lane wrote: According to http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedogdt=2014-07-21%2022%3A36%3A55 prairiedog saw a crash in make check on the 9.4 branch earlier tonight; but there's not a lot of evidence as to why in the buildfarm report, because

Re: [HACKERS] Some bogus results from prairiedog

2014-07-22 Thread Andrew Dunstan
On 07/22/2014 10:55 AM, Andrew Dunstan wrote: On 07/22/2014 12:24 AM, Tom Lane wrote: According to http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedogdt=2014-07-21%2022%3A36%3A55 prairiedog saw a crash in make check on the 9.4 branch earlier tonight; but there's not a lot

<    5   6   7   8   9   10   11   12   13   14   >