BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer'

From: "Vlad Dan Dascalescu" <ddascalescu(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2917: spi_prepare doesn't accept typename aliases such as 'integer'
Date: 2007-01-22 07:28:19
Message-ID: 200701220728.l0M7SJDt065930@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2917
Logged by: Vlad Dan Dascalescu
Email address: ddascalescu(at)gmail(dot)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

Browse pgsql-bugs by date

  From Date Subject
Next Message Adriaan van Os 2007-01-22 09:19:25 Re: [HACKERS] BUG #2907: pg_get_serial_sequence quoting
Previous Message prasad mahit 2007-01-22 04:54:20 BUG #2916: SELECT query has no destination for result data