From: | Arthur McGibbon <arthur(dot)mcgibbon(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17051: Incorrect params inferred on PREPARE |
Date: | 2021-06-08 13:37:17 |
Message-ID: | CAL2LXQW=GK2itoa4hBurd97q7Axsbpe+xRRm4DoM1txBGw86MA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thank you for the quick reply.
Could you point me to the documentation - I could only find
https://www.postgresql.org/docs/current/sql-prepare.html and it doesn't
mention how unknown params are handled.
On Tue, 8 Jun 2021 at 14:05, David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
wrote:
> On Tuesday, June 8, 2021, PG Bug reporting form <noreply(at)postgresql(dot)org>
> wrote:
>
>>
>> I'd hope that PostgreSQL would infer a "timestamp" type here or reply with
>> an error that it couldn't infer the parameter type.
>> Why does it default to type "text" and then effectively say the query is
>> invalid?
>
>
> Because no one has gotten a patch approved (not sure when/if there was a
> last attempt for this specific situation) to make the system “smarter”.
>
>>
>> I can cast my parameter in the query to get around this but am submitting
>> the bug because inferring "text" seems wrong.
>>
>>
> Maybe, but the failure to be more intelligent in this area is not itself a
> bug, and the rules for unknown literal resolution defaulting to text are
> documented.
>
> David J.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2021-06-08 13:48:32 | Re: BUG #17051: Incorrect params inferred on PREPARE |
Previous Message | David G. Johnston | 2021-06-08 13:05:08 | Re: BUG #17051: Incorrect params inferred on PREPARE |