Re:17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build - Mailing list pgsql-hackers

From zengman
Subject Re:17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build
Date
Msg-id tencent_30132FCF7F17CB2A6DA9BBC8@qq.com
Whole thread Raw
In response to 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: 17f446784d54da827f74c2acc0fa772a41b92354 breaks orafce build
List pgsql-hackers
Hi,

If you are in a hurry, you can try modifying the code of 'orafce' in this way.
```
postgres@zxm-VMware-Virtual-Platform:~/code/18/contrib/orafce$ git diff
diff --git a/Makefile b/Makefile
index ac72aa5..5772627 100644
--- a/Makefile
+++ b/Makefile
@@ -95,7 +95,7 @@ REGRESS = orafce\
 
 #REGRESS_OPTS = --load-language=plpgsql --schedule=parallel_schedule --encoding=utf8
 REGRESS_OPTS = --schedule=parallel_schedule --encoding=utf8
-
+override CFLAGS += -D'static_assert=_Static_assert'
 # override CFLAGS += -Wextra -Wimplicit-fallthrough=0
 
 ifdef NO_PGXS
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);
 ```

--
Regards,
Man Zeng
www.openhalo.org

pgsql-hackers by date:

Previous
From: Japin Li
Date:
Subject: Re: remove unnecessary include in src/backend/commands/policy.c
Next
From: shveta malik
Date:
Subject: Re: Skipping schema changes in publication