compatibility issue with DirectFunctionCall1

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: compatibility issue with DirectFunctionCall1
Date: 2011-05-27 09:06:39
Message-ID: BANLkTikyY7UW7rNcZ3fYq+eaonAMO01isA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

I am working on testing Orafce for PostgreSQL 9.1. I found a issue.

I cannot directly call a function "lower".

Is it correct?

select dbms_assert.enquote_name('''"AAA');
! enquote_name.
! --------------
! "'""aaa"
! (1 row)
!.
select dbms_assert.enquote_name('''"AAA', false);
enquote_name.
--------------
--- 1180,1188 ----
(1 row)
..
select dbms_assert.enquote_name('''"AAA');
! ERROR: could not determine which collation to use for lower() function
! HINT: Use the COLLATE clause to set the collation explicitly.
! CONTEXT: SQL function "enquote_name" statement 1
select dbms_assert.enquote_name('''"AAA', false);
enquote_name.

Datum
dbms_assert_enquote_name(PG_FUNCTION_ARGS)
{
<------>Datum name = PG_GETARG_DATUM(0);
<-->bool loweralize = PG_GETARG_BOOL(1);

<------>name = DirectFunctionCall1(quote_ident, name);

<------>if (loweralize)
<------><------>name = DirectFunctionCall1(lower, name);

<------>PG_RETURN_DATUM(name);
}

Regards

Pavel Stehule

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Leonardo Francalanci 2011-05-27 09:49:13 Re: switch UNLOGGED to LOGGED
Previous Message Florian Pflug 2011-05-27 09:01:11 Re: kill -KILL: What happens?