Oliver Jowett wrote:

template1=> prepare s1(int) as select $1;
PREPARE
template1=> execute s1('12');
 ?column?
----------
       12
(1 row)

(now replace "int" with "unknown"..)

Ok, bad example since the backend probably can't infer a type for the PREPARE in this case. A better example:


template1=> prepare s1(int) as select typname from pg_type where oid = $1;
PREPARE
template1=> execute s1('16');
typname ---------
bool
(1 row)

-O

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
     joining column's datatypes do not match

Reply via email to