dacology
dacology

Reputation: 954

How can I import a PostgreSQL .pgc file into a Postgres DB

I am expecting a data set to be supplied for data migration into a new system. The legacy vendor has supplied me with a .pgc file.

The output of command file filename.pgc is

file energyresourcingprod.pgc
energyresourcingprod.pgc: PostgreSQL custom database dump - v1.12-0

The first few lines from text editor are:

PGDMPrenergyresourcingprod9.2.49.2.4∑±00ENCODINGENCODINGSET client_encoding = 'UTF8';
false≤00
STDSTRINGS
STDSTRINGS)SET standard_conforming_strings = 'off';
false≥126214581287energyresourcingprodDATABASErCREATE DATABASE energyresourcingprod WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'C' LC_CTYPE = 'C';
$DROP DATABASE energyresourcingprod;
carerixfalse26152200publicSCHEMACREATE SCHEMA public;
DROP SCHEMA public;

The file is 300Mb and the majority of it contains hashed/base64? content:

ßû+˜)™yä⁄%(»j9≤\§^¸S∏Cîó|%ëflsfi∆†p1ñºúíñ Í∆î≈3õµ=qn
Mµ¢©]Q,uÆ<*Å™ííP’ÍOõ…∫U1Eu͡ IîfiärJ¥›•$ø...
...

Many Thanks

Upvotes: 0

Views: 1660

Answers (1)

Craig Ringer
Craig Ringer

Reputation: 325141

It's just a plain PostgreSQL dump.

Use pg_restore to load it into a database.

It's weird that they used that filename, but ultimately insignificant.

Upvotes: 2

Related Questions