Обсуждение: BUG #11484: 42804: il tipo del parametro 69 (numeric) non combacia con quello usato alla preparazione del piano

Поиск
Список
Период
Сортировка
The following bug has been logged on the website:

Bug reference:      11484
Logged by:          Francesco Cadili
Email address:      cadili@gesp.it
PostgreSQL version: 9.3.5
Operating system:   Ubuntu 12.04.05 LTS
Description:

The PSQL code execute a dynamic query:

The test is in two steps:
1. The code execute a query on a table forcing the type to integer.
exec 'select istat::integer as istat from
import.c070101_gestore_3459_wgs84u32n group by istat order by istat';

2. the code execute a similar query in another table without casting. The
type of the column is number(10,0)
exec 'select istat as istat from import.c070101_gestore_3459_wgs84u32n group
by istat order by istat';

The result of the test is that the first query is executed whereas the
second rise an 42804 error.

Recreating the function remove the error till a new sequence of steps is
performed.

The error also occur executing first step 2 and than 1. In this case the
error is raised after step 1.