Re: how can I tell it's postgresql data?

From: Aarni Ruuhimäki <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: Ricardo Anguiano <anguiano(at)codesourcery(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: how can I tell it's postgresql data?
Date: 2003-02-06 08:47:34
Message-ID: 200302061047.35028.aarni.ruuhimaki@kymi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Ricardo !

If you edit the files and see something like below you have pgsql files. There
could also be DROP TABLE statements first, depending on the used dump switch.

You can read the dump files in the db by first creating a blank database

#createdb my_db

and then reading in the dump

# cat my_dump_file | psql my_db

You may bump into dump version mismatch problems if the dump files are much
older than your new system.

Hope this helps you.

BR,

aarni

>>>>>>>> snip >>>>>>>>>>>>>>>>>>>>>>
--
-- Selected TOC Entries:
--
\connect - postgres

--
-- TOC Entry ID 2 (OID 1057417)
--
-- Name: pga_queries Type: TABLE Owner: postgres
--

CREATE TABLE "pga_queries" (
"queryname" character varying(64),
"querytype" character(1),
"querycommand" text,
"querytables" text,
"querylinks" text,
"queryresults" text,
"querycomments" text
);

--

On Wednesday 05 February 2003 10:36 pm, you wrote:
> Greetings,
>
> I have recently been given some files and told they were "postgre SQL
> database" files. I have a couple of questions.
>
> I am new to databases and postgresql. I have managed to install
> postgresql-7.2.2, initialize it, and get postmaster started under
> FreeBSD 4.7-RELEASE.
>
> Question #1: How can I tell if I have actual "postgresql database"
> files? The files have no extension. The `file` command
> reports the files are "MS-Windows true type font .ttf"
> files.
>
> db_restore doesn't like the files:
>
> pg_restore: [archiver] input file does not appear to be a
> valid archive
>
> Question #2: If these are database files, how can I get the data back
> in the database?
>
> Any help will be appreciated.
>
> Thanks,

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Wim 2003-02-06 10:54:59 Re: Postgres performace with large tables.
Previous Message Andrew McMillan 2003-02-06 08:11:34 Re: Postgres performace with large tables.