Skip to content

Docker image of PostgreSQL with additions (languages, extensions, etc...)

License

Notifications You must be signed in to change notification settings

Muritiku/postgres-tds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PostgreSQL-11

With oracle_fdw & tds_fdw (sybase & ms-sql) & pl/python 3 (plpython3u language)

by Anton Dziavitsyn 2019
a.dziavitsyn@gmail.com

Repository on GitHub: https://github.com/Muritiku/postgres-tds

Image on DockerHub

Builded docker image: muritiku/postgres-tds

How to run

You can use docker-compose.yml to build postgres+adminier for tests:

docker-compose -f pgsql-adminer.yml up

Then connect to postgreSQL instance, with using user: postgres, password: 1234
You may change credentials with using environment variables (POSTGRES_USER and POSTGRES_PASSWORD) in compose file.

Using tds_fdw for MS-SQL schema access (mapping)

Original documentation

Activate extension:

CREATE EXTENSION tds_fdw;

Connect server:

CREATE SERVER mssql_svr
	FOREIGN DATA WRAPPER tds_fdw
	OPTIONS (servername '127.0.0.1', port '1433', database 'tds_fdw_test', tds_version '7.1');

Grant user access:

GRANT USAGE ON FOREIGN SERVER mssql_svr TO postgres_username;

Create user mapping:

CREATE USER MAPPING FOR postgres_username
	SERVER mssql_svr 
	OPTIONS (username 'sa', password '');

Import MS-SQL schema:

IMPORT FOREIGN SCHEMA dbo
	FROM SERVER mssql_svr
	INTO public
	OPTIONS (import_default 'true');

Using oracle_fdw for Oracle schema access (mapping)

Original documentation

Activate extension:

CREATE EXTENSION oracle_fdw;

Connect server:

CREATE SERVER oradb FOREIGN DATA WRAPPER oracle_fdw
          OPTIONS (dbserver '//dbserver.mydomain.com:1521/ORADB');

Grant user access:

GRANT USAGE ON FOREIGN SERVER oradb TO postgres_username;

Create user mapping:

CREATE USER MAPPING FOR postgres_username
          SERVER oradb
          OPTIONS (user 'orauser', password 'orapwd');

Import ORACLE schema:

IMPORT FOREIGN SCHEMA ORA_SCHEMA
	FROM SERVER oradb
	INTO public;

About

Docker image of PostgreSQL with additions (languages, extensions, etc...)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages