compatibility issue with DirectFunctionCall1

Started by Pavel Stehuleover 14 years ago3 messages
#1Pavel Stehule
pavel.stehule@gmail.com

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

#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Pavel Stehule (#1)
Re: compatibility issue with DirectFunctionCall1

On 27.05.2011 12:06, Pavel Stehule wrote:

Hello,

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

I cannot directly call a function "lower".

See DirectFunctionCall1Coll()

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Heikki Linnakangas (#2)
Re: compatibility issue with DirectFunctionCall1

2011/5/27 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>:

On 27.05.2011 12:06, Pavel Stehule wrote:

Hello,

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

I cannot directly call a function "lower".

See DirectFunctionCall1Coll()

ook

Thank you

Pavel

Show quoted text

--
 Heikki Linnakangas
 EnterpriseDB   http://www.enterprisedb.com