Re: db restore from sql file

From: "James B(dot) Byrne" <byrnejb(at)harte-lyne(dot)ca>
To: byrnejb(at)harte-lyne(dot)ca
Cc: pgadmin-support(at)lists(dot)postgresql(dot)org
Subject: Re: db restore from sql file
Date: 2021-02-19 20:08:52
Message-ID: a52168aa671ee4a10003595422926913.squirrel@webmail.harte-lyne.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Fri, February 19, 2021 15:04, James B. Byrne wrote:
>
>
> On Fri, February 19, 2021 15:00, James B. Byrne wrote:
>>
>>
>> Is there no way to restore from an sql file from within pgadmin4?
>>
>>
>
> I can load it as an SQL query of course. And I tried that. But the dump file
> contains this line which causes the query to fail:
>
> ERROR: syntax error at or near "\"
> LINE 32: \connect hll_redmine_copy
> ^
> SQL state: 42601
> Character: 845
>
>
> I have removed this and will try again. But the existence of that line in an
> SQL dump is a bit disconcerting.
>

No, it died here:

COPY public.attachments (id, container_id, container_type, filename,
disk_filename, filesize, content_type, digest, downloads, author_id,
created_on, description, disk_directory) FROM stdin;
1 8 Issue putty.jpg 080513110337_putty.jpg 64088 image/jpeg 7138a6b00422eff6a9c4cee64dc79f00 0 3 2006-03-16
19:16:09 \N \N

ERROR: syntax error at or near "1"
LINE 2685: 1 8 Issue putty.jpg 080513110337_putty.jpg 64088 image/jpeg ...
^
SQL state: 42601
Character: 72007

--
*** e-Mail is NOT a SECURE channel ***
Do NOT transmit sensitive data via e-Mail
Unencrypted messages have no legal claim to privacy
Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne mailto:ByrneJB(at)Harte-Lyne(dot)ca
Harte & Lyne Limited http://www.harte-lyne.ca
9 Brockley Drive vox: +1 905 561 1241
Hamilton, Ontario fax: +1 905 561 0757
Canada L8E 3C3

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2021-02-19 20:58:19 Re: db restore from sql file
Previous Message James B. Byrne 2021-02-19 20:04:27 Re: db restore from sql file