issue583 fix (copyfrom_internal.h is not included by chance). #589
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#583
== repro step ==
as issue described
== compile failure ==
pxf_fragment.c: In function ‘ProcessRequest’:
pxf_fragment.c:547:15: error: ‘RAW_BUF_SIZE’ undeclared (first use in this function)
547 | char buffer[RAW_BUF_SIZE];
| ^~~~~~~~~~~~
== analysis ==
RAW_BUF_SIZE is defined in copyfrom_internal.h
src/include/commands/copyfrom_internal.h:#define RAW_BUF_SIZE 65536 /* we palloc RAW_BUF_SIZE+1 bytes */
in pxf_fragment.c
#if (PG_VERSION_NUM <= 140000)
#include "commands/copyfrom_internal.h"
#endif
PG version is 14.4,
PG_VERSION_NUM is 140004
happen to see below code in pxf_fdw.c
#if (PG_VERSION_NUM >= 140000)
#include "commands/copyfrom_internal.h"
#include "commands/copyto_internal.h"
#endif
the one in pxf_fragment.c looks to be typo
#if (PG_VERSION_NUM <= 140000) ==> should be (PG_VERSION_NUM >= 140000)
#include "commands/copyfrom_internal.h"
#endif
note: git log history for the two files
commit 10538ad
Merge: d5573b9 d457cb4
Author: Cloudberry cloudberry@initial.code.dump
Date: Wed Jun 7 08:57:14 2023 +0000
commit 7c3ae7b
Author: Ashwin Agrawal aashwin@vmware.com
Date: Tue Jan 12 09:38:40 2021 -0800
commit 19cd1cf
Merge: a714299 9e1c9f9
Author: Heikki Linnakangas hlinnakangas@pivotal.io
Date: Tue Sep 22 18:12:30 2020 +0300
...
commit 10538ad
Merge: d5573b9 d457cb4
Author: Cloudberry cloudberry@initial.code.dump
Date: Wed Jun 7 08:57:14 2023 +0000
commit 3b1ada5
Author: Oliver Albertini oalbertini@pivotal.io
Date: Thu Jan 30 15:16:58 2020 -0800
(END)