Orafce 3.25 and nvl function ?

90 views
Skip to first unread message

Suga Mugo

unread,
Oct 19, 2022, 8:03:20 AM10/19/22
to Better Oracle functions support
Hi,

Does Orafce 3.25 support nvl function?

Pavel Stehule

unread,
Oct 19, 2022, 10:48:08 PM10/19/22
to orafce-...@googlegroups.com
Hi


st 19. 10. 2022 v 14:03 odesílatel 'Suga Mugo' via Better Oracle functions support <orafce-...@googlegroups.com> napsal:
Hi,

Does Orafce 3.25 support nvl function?

yes

select nvl('A'::text, 'B');
nvl
-----
A
(1 row)

select nvl(NULL::text, 'B');
nvl
-----
B
(1 row)

select nvl(NULL::text, NULL);
nvl
-----

(1 row)

select nvl(1, 2);
nvl
-----
1
(1 row)

select nvl(NULL::int, 2);
nvl
-----
2
(1 row)

--
You received this message because you are subscribed to the Google Groups "Better Oracle functions support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orafce-genera...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/orafce-general/f80dae71-b17d-4950-9f5a-ffc977428818n%40googlegroups.com.

Suga Mugo

unread,
Oct 20, 2022, 1:11:42 AM10/20/22
to Better Oracle functions support
Ok thank you.

I am getting an error the following error
 ERROR: function nvl(timestamp without time zone, timestamp without time zone) does not exist

Even though I have orafce 3.25 extension installed

Suga Mugo

unread,
Oct 20, 2022, 5:30:41 AM10/20/22
to Better Oracle functions support

Ok thank you.

I am getting an error the following error
 ERROR: function nvl(timestamp without time zone, timestamp without time zone) does not exist

Even though I have orafce 3.25 extension installed.

However if I revert back to orafce 3.18 I am not getting that error. What could be the issue ?

On Thursday, October 20, 2022 at 4:48:08 AM UTC+2 Pavel Stehule wrote:

Pavel Stehule

unread,
Oct 20, 2022, 11:49:25 PM10/20/22
to orafce-...@googlegroups.com
Hi


čt 20. 10. 2022 v 11:30 odesílatel 'Suga Mugo' via Better Oracle functions support <orafce-...@googlegroups.com> napsal:

Ok thank you.

I am getting an error the following error
 ERROR: function nvl(timestamp without time zone, timestamp without time zone) does not exist

Even though I have orafce 3.25 extension installed.

probably you have not set search_path to oracle schema.

Older versions of orafce placed functions dirty to some schemas like public, pg_catalog and oracle. Now all functions are in schema oracle.

(2022-10-21 05:45:23) postgres=# select nvl(null, current_timestamp);
ERROR:  function nvl(unknown, timestamp with time zone) does not exist
LINE 1: select nvl(null, current_timestamp);
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

(2022-10-21 05:44:31) postgres=# select oracle.nvl(null, current_timestamp);
┌───────────────────────────────┐
│              nvl              │
╞═══════════════════════════════╡
│ 2022-10-21 05:45:23.213439+02 │
└───────────────────────────────┘
(1 row)

(2022-10-21 05:48:11) postgres=# set search_path to oracle, public;
SET
(2022-10-21 05:48:23) postgres=# select nvl(null, current_timestamp);
┌───────────────────────────────┐
│              nvl              │
╞═══════════════════════════════╡
│ 2022-10-21 05:48:26.459504+02 │
└───────────────────────────────┘
(1 row)

Regards

Pavel
 
Reply all
Reply to author
Forward
0 new messages