Обсуждение: migration from postgresql-7.2. to 7.4.1 : invalid command \n

Поиск
Список
Период
Сортировка

migration from postgresql-7.2. to 7.4.1 : invalid command \n

От
Frederic Medery
Дата:
I did a pg_dump with the -d option during the extract.
Inside the dump I have a lot of \012. i replace those with \n (carriage
return).

But when I try to import into a new DB I had : invalid command \n

Is ther e a better way to add carriage return in the sql file ?

Thank !







Re: migration from postgresql-7.2. to 7.4.1 : invalid command \n

От
Tom Lane
Дата:
Frederic Medery <dist-list@LEXUM.UMontreal.CA> writes:
> I did a pg_dump with the -d option during the extract.
> Inside the dump I have a lot of \012. i replace those with \n (carriage
> return).

Huh?  \012 *is* \n.  Carriage return (a/k/a \r or \015) is something
else, and it is not what you want.

            regards, tom lane

Re: migration from postgresql-7.2. to 7.4.1 : invalid command

От
Frederic Medery
Дата:
I had to you use pg_dump -d -D. now the import works fine !

F


Tom Lane wrote:

>Frederic Medery <dist-list@LEXUM.UMontreal.CA> writes:
>
>
>>I did a pg_dump with the -d option during the extract.
>>Inside the dump I have a lot of \012. i replace those with \n (carriage
>>return).
>>
>>
>
>Huh?  \012 *is* \n.  Carriage return (a/k/a \r or \015) is something
>else, and it is not what you want.
>
>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
>