BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer' - Mailing list pgsql-bugs

From Vlad Dan Dascalescu
Subject BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer'
Date
Msg-id 200701220728.l0M7SJDt065930@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2917
Logged by:          Vlad Dan Dascalescu
Email address:      ddascalescu@gmail.com
PostgreSQL version: 8.2.1
Operating system:   RHEL AS 4
Description:        spi_prepare doesn't accept typename aliases such as
'integer'
Details:

In a PL/Perl stored procedure,

spi_prepare('...query...', 'integer')

generates the following error when spi_prepare ends up being called:

ERROR: error from Perl function: type "integer" does not exist at line X.

Replacing 'integer' with 'INT4' solves the issue. Same for 'float4'
replacing 'real' etc.

An additional issue is that error messages are consistent with 'integer' and
'real', not with 'int4' and 'float4':

ERROR: error from Perl function: invalid input syntax for type real: "some
string here" at line X.

Hope that helps,
Vlad Dan Dascalescu

pgsql-bugs by date:

Previous
From: Adriaan van Os
Date:
Subject: Re: BUG #2907: pg_get_serial_sequence quoting
Next
From: "prasad"
Date:
Subject: BUG #2914: SELECT query has no destination for result data