From: John R Pierce <pierce@hogranch.com>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #8056: postgres forgets hstore over time
Date: Wed, 10 Apr 2013 12:32:24 -0700
Message-ID: <5165BE48.6040309@hogranch.com> (raw)
In-Reply-To: <1365616876.67955.YahooMailNeo@web140203.mail.bf1.yahoo.com>
References: <E1UPkMS-0008N4-Pr@wrigleys.postgresql.org>
<CAHHcreqv+Nu9+71G1eRb8JODCqR12w1sM9QA-wRuELeRC6O-cA@mail.gmail.com>
<1365616876.67955.YahooMailNeo@web140203.mail.bf1.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 4/10/2013 11:01 AM, E E wrote:
>
> CREATE OR REPLACE FUNCTION accounts.myhstore_merge(myh hstore, mytext
> text[])
> RETURNS hstore AS
> $BODY$BEGIN
> SET search_path TO public;
> RETURN myh || hstore(mytext);
>
> END;$BODY$
> LANGUAGE plpgsql VOLATILE
> COST 100;
public.hstore(...) would have been much simpler than changing the
search_path, which is persistent to the connection and likely will
backfire if your apps are changing it to something else.
--
john r pierce 37N 122W
somewhere on the middle of the left coast
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: BUG #8056: postgres forgets hstore over time
In-Reply-To: <5165BE48.6040309@hogranch.com>
References: <E1UPkMS-0008N4-Pr@wrigleys.postgresql.org> <CAHHcreqv+Nu9+71G1eRb8JODCqR12w1sM9QA-wRuELeRC6O-cA@mail.gmail.com> <1365616876.67955.YahooMailNeo@web140203.mail.bf1.yahoo.com> <5165BE48.6040309@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox