postgresqloracle-fdw

Identify the postgres extension version shows different versions


Have a postgres database with extensions

If I do psql>\dx it shows

oracle_fdw, 1.1, foreign data wrapper for Oracle access 

But if I do psql>SELECT oracle_diag('oraclegwserver'); it says

oracle_fdw 2.0.0, PostgreSQL 10.0, Oracle client 11.2.0.3.0, Oracle server 11.2.0.2.0

Which version is correct or used?


Solution

  • The first is the extension version, which changes only if the extension's objects change. The second is the version of oracle_fdw.

    See the documentation:

    Note that the extension version as shown by the psql command \x or the system catalog pg_available_extensions is not the installed version of oracle_fdw. To get the oracle_fdw version, use the function oracle_diag.