Skip site navigation (1) Skip section navigation (2)

Re: Another swing at JSON

From: Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com>
To: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Another swing at JSON
Date: 2011-03-29 16:57:21
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Mar 29, 2011 at 10:26 AM, Dimitri Fontaine
<dimitri(at)2ndquadrant(dot)fr> wrote:
> Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com> writes:
>> Done.  The new extension interface isn't exactly compatible with the
>> old, so I dropped support for PostgreSQL 8.4 from the module.  I
>> suppose I could maintain a back-ported json module separately.
> In fact it is, but there's some history hiding the fact.  I'm overdue to
> another doc patch on the matter, but it's quite simple.

Cool, thanks!  Attached is an updated patch for the module.  Backward
compatibility has been brought back, and the module has been tested on
PostgreSQL versions 8.4.0 and 9.1devel.

However, there are a couple minor caveats:

 * The last test, relocatable, fails (and should fail) on pre-9.1
because it's a test related to the new extension interface.
 * init.sql is rather hacky in how it caters to both the old extension
system and the new one:

  \set ECHO none
  SET client_min_messages = fatal;

  \i json--0.1.sql

  SET client_min_messages = warning;
  RESET client_min_messages;
  \set ECHO all

It would be nice if I could make a Makefile conditional that skips the
relocatable test and loads init-pre9.1.sql if the new extension
interface isn't available.  Is there a Makefile variable or something
I can use to do this?

Also, should uninstall_json.sql be named something else, like
json--uninstall--0.1.sql ?


Joey Adams

Attachment: add-json-contrib-module-20110328-3.patch
Description: text/x-patch (80.4 KB)

In response to


pgsql-hackers by date

Next:From: Simon RiggsDate: 2011-03-29 17:10:57
Subject: Re: Additional options for Sync Replication
Previous:From: Robert HaasDate: 2011-03-29 16:40:24
Subject: Re: Additional options for Sync Replication

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group