Re: 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build

From: zengman <zengman(at)halodbtech(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build
Date: 2025-12-26 14:00:28
Message-ID: tencent_5F87D3F5067FF44323E189C0@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> it can be temporal fix - what is interesting, I have no problem with build of plpgql_check

Simply put, orafce comes with a local assert.h file while plpgsql_check does not.
Just rename the local assert.h file in orafce and the issue will be fixed.

```
diff --git a/assert.c b/assert.c
index 30f53ad..78915ba 100644
--- a/assert.c
+++ b/assert.c
@@ -1,6 +1,6 @@
#include "postgres.h"
#include "funcapi.h"
-#include "assert.h"
+#include "ora_errcodes.h"
#include "miscadmin.h"
#include "utils/acl.h"
#include "utils/builtins.h"
diff --git a/datefce.c b/datefce.c
index 3cc42cd..fc1e5d6 100644
--- a/datefce.c
+++ b/datefce.c
@@ -1281,7 +1281,11 @@ orafce_sys_extract_utc_oracle_date(PG_FUNCTION_ARGS)
{
TimestampTz loc_ts;

-#if PG_VERSION_NUM >= 130000
+#if PG_VERSION_NUM >= 180000
+
+ loc_ts = timestamp2timestamptz_safe(PG_GETARG_TIMESTAMP(0), NULL);
+
+#elif PG_VERSION_NUM >= 130000

loc_ts = timestamp2timestamptz_opt_overflow(PG_GETARG_TIMESTAMP(0), NULL);

diff --git a/msvc/orafce.2010.vcxproj b/msvc/orafce.2010.vcxproj
index 8efe13d..58e4997 100644
--- a/msvc/orafce.2010.vcxproj
+++ b/msvc/orafce.2010.vcxproj
@@ -510,7 +510,7 @@
<ClCompile Include="..\varchar2.c" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\assert.h" />
+ <ClInclude Include="..\ora_errcodes.h" />^M
<ClInclude Include="..\builtins.h" />
<ClInclude Include="..\orafce.h" />
<ClInclude Include="..\pipe.h" />
diff --git a/msvc/orafce.2010.vcxproj.filters b/msvc/orafce.2010.vcxproj.filters
index 57ac0c6..5c2fbb7 100644
--- a/msvc/orafce.2010.vcxproj.filters
+++ b/msvc/orafce.2010.vcxproj.filters
@@ -124,7 +124,7 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\assert.h">
+ <ClInclude Include="..\ora_errcodes.h">^M
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="..\builtins.h">
diff --git a/assert.h b/ora_errcodes.h
similarity index 100%
rename from assert.h
rename to ora_errcodes.h
```

--
Regards,
Man Zeng
www.openhalo.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message zengman 2025-12-26 14:04:46 Re: 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build
Previous Message Marcos Pegoraro 2025-12-26 13:16:04 Re: Get rid of "Section.N.N.N" on DOCs