Skip site navigation (1) Skip section navigation (2)

pgsql: Coerce 'unknown' type parameters to the right type in the

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Coerce 'unknown' type parameters to the right type in the
Date: 2010-08-18 12:20:15
Message-ID: 20100818122015.EE2B27541D7@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Log Message:
-----------
Coerce 'unknown' type parameters to the right type in the fixed-params
parse_analyze() function. That case occurs e.g with PL/pgSQL
EXECUTE ... USING 'stringconstant'.

The coercion with a CoerceViaIO node. The result is similar to the coercion
via input function performed for unknown constants in coerce_type(),
except that this happens at runtime.

Backpatch to 9.0. The issue is present in 8.4 as well, but the coerce param
hook infrastructure this patch relies on was introduced in 9.0. Given the
lack of user reports and harmlessness of the bug, it's not worth attempting
a different fix just for 8.4.

Modified Files:
--------------
    pgsql/src/backend/parser:
        parse_param.c (r2.4 -> r2.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_param.c?r1=2.4&r2=2.5)

Responses

pgsql-hackers by date

Next:From: Greg StarkDate: 2010-08-18 12:45:49
Subject: Re: Progress indication prototype
Previous:From: Pavel StehuleDate: 2010-08-18 12:08:43
Subject: proposal: tuplestore, tuplesort aggregate functions

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2010-08-18 12:20:22
Subject: pgsql: Coerce 'unknown' type parameters to the right type in the
Previous:From: User FxjrDate: 2010-08-18 03:19:58
Subject: npgsql - Npgsql2: Added fix to return CLR type when working with

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group