From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: coladict@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14599: Segmentation fault and database corruption with hstore
Date: Mon, 27 Mar 2017 16:39:23 +0100
Message-ID: <87wpba7n5h.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <20170327143251.2688.47498@wrigleys.postgresql.org>
References: <20170327143251.2688.47498@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
>>>>> "coladict" == coladict <coladict@gmail.com> writes:
coladict> 3. "CREATE CAST (varchar AS hstore) WITHOUT FUNCTION AS
coladict> ASSIGNMENT;". If we skip step 4, everything works fine, but I
coladict> was afraid it might fail with longer strings, so I did that
coladict> anyway.
What on earth makes you think this is safe or useful? Creating a WITHOUT
FUNCTION cast opens a hole whereby you can feed values to the hstore
functions which are not actually valid hstores, so _of course_ it
crashes. (There's a good reason why only superusers can create such
casts.)
Once you've stored such a value in a table, then subsequent accesses to
it will of course crash too.
--
Andrew (irc:RhodiumToad)
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: andrew@tao11.riddles.org.uk, coladict@gmail.com
Subject: Re: BUG #14599: Segmentation fault and database corruption with hstore
In-Reply-To: <87wpba7n5h.fsf@news-spur.riddles.org.uk>
References: <20170327143251.2688.47498@wrigleys.postgresql.org> <87wpba7n5h.fsf@news-spur.riddles.org.uk>
* 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