pgsql: Use a new hstore extension version for added json functions.

Started by Andrew Dunstanover 12 years ago3 messagescomitters
Jump to latest
#1Andrew Dunstan
andrew@dunslane.net

Use a new hstore extension version for added json functions.

This should have been done when the json functionality was added to
hstore in 9.3.0. To handle this correctly, the upgrade script therefore
uses conditional logic by using plpgsql in a DO statement to add the two
new functions and the new cast. If hstore_to_json_loose is detected as
already present and dependent on the hstore extension nothing is done.
This will require that the database be loaded with plpgsql.

People who have installed the earlier and spurious 1.1 version of hstore
will need to do:

ALTER EXTENSION hstore UPDATE;

to pick up the new functions properly.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/83e83aad562ce8a3e44335314a933528824dc521

Modified Files
--------------
contrib/hstore/hstore--1.1--1.2.sql | 47 +++
contrib/hstore/hstore--1.1.sql | 537 -----------------------------------
contrib/hstore/hstore--1.2.sql | 537 +++++++++++++++++++++++++++++++++++
contrib/hstore/hstore.control | 2 +-
4 files changed, 585 insertions(+), 538 deletions(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: pgsql: Use a new hstore extension version for added json functions.

Andrew Dunstan <andrew@dunslane.net> writes:

Use a new hstore extension version for added json functions.
This should have been done when the json functionality was added to
hstore in 9.3.0. To handle this correctly, the upgrade script therefore
uses conditional logic by using plpgsql in a DO statement to add the two
new functions and the new cast. If hstore_to_json_loose is detected as
already present and dependent on the hstore extension nothing is done.
This will require that the database be loaded with plpgsql.

People who have installed the earlier and spurious 1.1 version of hstore
will need to do:

ALTER EXTENSION hstore UPDATE;

to pick up the new functions properly.

Branch
------
REL9_3_STABLE

Um ... I think it's too late to do that sort of thing in 9.3.

regards, tom lane

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#2)
Re: pgsql: Use a new hstore extension version for added json functions.

On 09/29/2013 05:55 PM, Tom Lane wrote:

Andrew Dunstan <andrew@dunslane.net> writes:

Use a new hstore extension version for added json functions.
This should have been done when the json functionality was added to
hstore in 9.3.0. To handle this correctly, the upgrade script therefore
uses conditional logic by using plpgsql in a DO statement to add the two
new functions and the new cast. If hstore_to_json_loose is detected as
already present and dependent on the hstore extension nothing is done.
This will require that the database be loaded with plpgsql.
People who have installed the earlier and spurious 1.1 version of hstore
will need to do:
ALTER EXTENSION hstore UPDATE;
to pick up the new functions properly.
Branch
------
REL9_3_STABLE

Um ... I think it's too late to do that sort of thing in 9.3.

Don't you think this is a bug fix?

cheers

andrew

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers