Re: problem with recreating database with export

Поиск
Список
Период
Сортировка
От Dennis Gearon
Тема Re: problem with recreating database with export
Дата
Msg-id 1348775374.15878.androidMobile@web181005.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на problem with recreating database with export  (Dennis Gearon <gearond@sbcglobal.net>)
Список pgsql-general

The only thing that I can offer is that it works from inside psql as user postgre but NOT from invoking postgres using -f filename from the commas line as user postgre. I have to admit that I did not use -U as OS user postgres, but that shouldn't be necessary with a stock gnarled_conf file.

The errors are 99% 'illegal command' associated with '\B'day or '\.' ending a COPY command.

Sent from Yahoo! Mail on Android



From: Raymond O'Donnell <rod@iol.ie>;
To: Dennis Gearon <gearond@sbcglobal.net>;
Cc: Adrian Klaver <adrian.klaver@gmail.com>; <pgsql-general@postgresql.org>;
Subject: Re: [GENERAL] problem with recreating database with export
Sent: Thu, Sep 27, 2012 7:07:30 PM

On 27/09/2012 15:55, Dennis Gearon wrote:
> <note to future>
> To anyone reading this in the future, if you have problems importing a
> plain text database export, it is usually impossible to do:
> psql -d some_dbase -f the_backup.sql. I don't know why. What works is

I think that's a bit of an over-generalisation. :-) What errors do you get?

> doing 'cd ./the_files_directory', going INTO psql command line, then
> issuing '\i the_backup.sql', and it's really fast. 8 seconds for 128
> mbyte file.

That's equivalent to passing the name of the file to psql via the -f
option... assuming of course that you're in the same directory as the
file; otherwise pass the full relative or absolute path.

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: problem with recreating database with export
Следующее
От: antony.carvalho@lightbase.com.br
Дата:
Сообщение: XML indexing