Re: how can I tell it's postgresql data? - Mailing list pgsql-novice

From Aarni Ruuhimäki
Subject Re: how can I tell it's postgresql data?
Date
Msg-id 200302061047.35028.aarni.ruuhimaki@kymi.com
Whole thread Raw
In response to how can I tell it's postgresql data?  (Ricardo Anguiano <anguiano@codesourcery.com>)
List 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,



pgsql-novice by date:

Previous
From: Andrew McMillan
Date:
Subject: Re: Postgres performace with large tables.
Next
From: Wim
Date:
Subject: Re: Postgres performace with large tables.