Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PostgreSQL 9.5 #19

Open
mc-soi opened this issue Sep 5, 2015 · 4 comments
Open

Support PostgreSQL 9.5 #19

mc-soi opened this issue Sep 5, 2015 · 4 comments

Comments

@mc-soi
Copy link

mc-soi commented Sep 5, 2015

In order to comile with PostgreSQL 9.5, in file JDBC_FDW/jdbc_fdw.c, on line 1079, change the ending from:
scan_relid, NIL, NIL));
to:
scan_relid, NIL, NIL, NIL));

I still use this (jdbc_fdw) over jdbc2_fdw when I need to access queries (SQL statements & stored procedures) as jdbc2_fdw seems to only supports tables. However, the Java file names overlap between projects. I do not check to see if the Java files are any different. Technically, the other project should rename their files, however, I am not sure if they anticipated people using both jdbc_fdw and jdbc2_fdw side by side. This patch adds support for PostgreSQL 9.5 by making the change above, and changes the code to use the new Java file names:
https://gist.github.com/mc-soi/cce26e0e6186d416a9cc
You might have to rename the files before applying this patch.

@atris
Copy link
Owner

atris commented Sep 8, 2015

Thanks!

Can you rebase this patch to JDBC_FDW's current code base and open a pull request please? It only makes sense that this patch gets committed in your name!

@rinolf
Copy link

rinolf commented Jan 25, 2016

Hi,

Looks like make_foreignscan need 8 arguments now (http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5043193b78919a1bd144563aadc2f7f726549913) so after applying the patch I still get an error message about too few arguments. I tried to add one more NIL so it now look like this:
return (make_foreignscan(tlist, scan_clauses, scan_relid, NIL, NIL, NIL, NIL, NIL));

But I then get the message:
"struct Plan *" expected but argument is type "struct List *" (translation by me as the server for some reason is not in English...)

I'm not a programmer so I might have misunderstood something. I'm using postgresql 9.5.0 source code uploaded Januari 4 from http://www.postgresql.org/ftp/source/v9.5.0/.

Is there an easy way to solve this?

@santanab
Copy link

santanab commented Apr 7, 2016

For compile correctly with 9.5, I had to add more arguments for the create_foreignscan_path and the make_foreignscan parts.

/* Create a ForeignPath node and add it as only possible path /
/add_path(baserel, (Path)create_foreignscan_path(root, baserel, baserel->rows, startup_cost, total_cost, NIL, NULL, NIL)); */ --commented
add_path(baserel, (Path
)create_foreignscan_path(root, baserel, baserel->rows, startup_cost, total_cost, NIL, NULL, NIL, NIL));

/* Create the ForeignScan node _/
/_return (make_foreignscan(tlist, scan_clauses, scan_relid, NIL, NIL)); */ --commented
return (make_foreignscan(tlist, scan_clauses, scan_relid, NIL, NIL, NIL, NIL, NIL));

@atris
Copy link
Owner

atris commented Apr 7, 2016

Can you submit a Patch for the same please?

On Thu, Apr 7, 2016 at 11:31 PM, santanab [email protected] wrote:

For compile correctly with 9.5, I had to add more arguments for the
create_foreignscan_path and the make_foreignscan parts.

/* Create a ForeignPath node and add it as only possible path
_/ /_add_path(baserel, (Path
)create_foreignscan_path(root, baserel, baserel->rows, startup_cost,
total_cost, NIL, NULL, NIL)); */ --commented add_path(baserel, (Path
)create_foreignscan_path(root,
baserel, baserel->rows, startup_cost, total_cost, NIL, NULL, NIL, NIL));

/* Create the ForeignScan node
_/ /_return (make_foreignscan(tlist, scan_clauses, scan_relid, NIL,
NIL)); */ --commented
return (make_foreignscan(tlist, scan_clauses, scan_relid, NIL, NIL, NIL,
NIL, NIL));


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#19 (comment)

Regards,

Atri
l'apprenant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants