Thread

  1. Re: 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build

    zengman <zengman@halodbtech.com> — 2025-12-26T14:00:28Z

    > 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