From: | Wells Oliver <wells(dot)oliver(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: PG 12 hstore creation cast issue |
Date: | 2019-10-30 17:57:19 |
Message-ID: | CAOC+FBX00Hjb6gS01buETuOAo9n4fpoBT5gcjQJGP+hHVKUwow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Yeah. Dang, hoist by own convenience petard. My own doing, folks.
Appreciate the detail.
On Wed, Oct 30, 2019 at 10:55 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> > We have this kind of code that worked in 9.6:
>
> > select hstore(array['foo'], array[1.0::numeric]);
>
> > But now yields:
>
> > ERROR: function hstore(text[], numeric[]) does not exist
> > LINE 1: select hstore(array['foo'], array[1.0::numeric]);
> > ^
> > HINT: No function matches the given name and argument types. You might
> > need to add explicit type casts.
>
> > Is there a way to create hstores with numeric types as data? Does
> > everything need to be cast as text?
>
> For me, that query fails that way in 9.6 too. This is unsurprising
> because the only two-argument variants of hstore() are
>
> hstore(text, text)
> hstore(text[], text[])
>
> both in 9.6 and current. I suppose that this case was getting
> covered by one of those implicit casts you got rid of, allowing
> numeric[] to be silently cast to text[].
>
> regards, tom lane
>
--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | mallikarjun t | 2019-10-31 11:34:01 | Re: How to know transaction count in hour basic |
Previous Message | Tom Lane | 2019-10-30 17:55:52 | Re: PG 12 hstore creation cast issue |