Parameter types are inferred from context of first use only.

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: farmernick-pg(at)varteg(dot)nz
Subject: Parameter types are inferred from context of first use only.
Date: 2018-07-23 09:14:48
Message-ID: 153233728858.1404.15268121695358514937@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/sql-prepare.html
Description:

Background can be found on the bugs list (pgsql-bug #15289). It was
explained that when a prepared statement parameter needs to have its type
inferred then, should the parameter be used more than once, only the first
use is considered. (The example in that report is that the type of $1 can be
inferred from "($1 = col) or ($1 is null)" but not from "($1 is null) or ($1
= col)".)

The documentation as it stands says only that the parameter's type is
inferred from the context in which it is used. The "first use only" proviso
is not mentioned (hence "context" isn't so broad as to consist of all of the
expressions in which the parameter appears).

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2018-07-24 21:32:09 Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work.
Previous Message Peter Eisentraut 2018-07-22 21:27:31 Re: Documented toolchain for building docs on Windows