<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>:)</div>

<div> </div>

<div>pg_dump: <a href="https://www.youtube.com/watch?v=QR4ugGNT_yI">https://www.youtube.com/watch?v=QR4ugGNT_yI</a></div>

<div>
<div>pg_restore: <a href="https://www.youtube.com/watch?v=TsLTDttthRw">https://www.youtube.com/watch?v=TsLTDttthRw</a></div>

<div> </div>

<div>Make screenshots of errors and show us. Thank you.</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Samstag, 25. Januar 2020 um 07:10 Uhr<br/>
<b>Von:</b> "Shaozhong SHI" <shishaozhong@gmail.com><br/>
<b>An:</b> "PostGIS Users Discussion" <postgis-users@lists.osgeo.org><br/>
<b>Betreff:</b> Re: [postgis-users] Errors in loading table with geom which was produced with pg-dump</div>

<div name="quoted-content">I do not know why.
<div> </div>

<div>What I am looking for is a robust and efficient way to do the following.</div>

<div> </div>

<div>Make a copy of a table from a database.</div>

<div> </div>

<div>Load it into another database.</div>

<div> </div>

<div>It needs to work with tables with from.</div>

<div> </div>

<div><br/>
<br/>
On Friday, 24 January 2020, Regina Obe <<a href="mailto:lr@pcorp.us" onclick="parent.window.location.href='mailto:lr@pcorp.us'; return false;" target="_blank">lr@pcorp.us</a>> wrote:

<blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex;border-left: 1.0px rgb(204,204,204) solid;padding-left: 1.0ex;">
<div>
<div>
<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);">Shao,</span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);">You are still not providing enough information.</span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);">We need the exact command you were using on pg_dump.  For example only if you are doing a plain text dump with pg_dump, can you use psql to load it.</span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);">A binary or tar dump needs to be loaded with pg_restore.  This piece of information is missing in your below explanation and could be why you are getting invalid commands.</span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);"> </span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);">Same goes for psql</span></p>

<p class="MsoNormal"><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;color: rgb(31,73,125);"> </span></p>

<p class="MsoNormal"><b><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;">From:</span></b><span style="font-size: 11.0pt;font-family: Calibri , sans-serif;"> postgis-users [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org" onclick="parent.window.location.href='mailto:postgis-users-bounces@lists.osgeo.org'; return false;" target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Shaozhong SHI<br/>
<b>Sent:</b> Friday, January 24, 2020 6:44 AM<br/>
<b>To:</b> PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" onclick="parent.window.location.href='mailto:postgis-users@lists.osgeo.org'; return false;" target="_blank">postgis-users@lists.osgeo.org</a>><br/>
<b>Subject:</b> Re: [postgis-users] Errors in loading table with geom which was produced with pg-dump</span></p>

<p class="MsoNormal"> </p>

<div>
<p class="MsoNormal">Hi, Raul Marin Rodriguez,</p>

<div>
<p class="MsoNormal"> </p>
</div>

<div>
<p class="MsoNormal"><span style="font-size: 11.5pt;color: rgb(32,31,30);">We are using PostgreSQL <span><span style="border: none windowtext 1.0pt;padding: 0.0in;">version</span></span> 10.10 and <span><span style="border: none windowtext 1.0pt;padding: 0.0in;">postgis</span></span> <span><span style="border: none windowtext 1.0pt;padding: 0.0in;">version</span></span> 2.4.8</span> .</p>
</div>

<div>
<p class="MsoNormal"> </p>
</div>

<div>
<p class="MsoNormal">The command used for dump the data is pg_dump.exe.</p>
</div>

<div>
<p class="MsoNormal"> </p>
</div>

<div>
<p class="MsoNormal">The command used for import data is psql.exe.</p>
</div>

<div>
<p class="MsoNormal"> </p>
</div>

<div>
<p class="MsoNormal">The error message is full of invalid commands.</p>
</div>

<div>
<p class="MsoNormal"> </p>
</div>

<div>
<p class="MsoNormal">Regards,</p>
</div>

<div>
<p class="MsoNormal"> </p>
</div>

<div>
<p class="MsoNormal">Shao </p>
</div>
</div>

<p class="MsoNormal"> </p>

<div>
<div>
<p class="MsoNormal">On Thu, 23 Jan 2020 at 17:28, <<a href="mailto:rmrodriguez@carto.com" onclick="parent.window.location.href='mailto:rmrodriguez@carto.com'; return false;" target="_blank">rmrodriguez@carto.com</a>> wrote:</p>
</div>

<blockquote style="border: none;border-left: solid rgb(204,204,204) 1.0pt;padding: 0.0in 0.0in 0.0in 6.0pt;margin-left: 4.8pt;margin-right: 0.0in;">
<p class="MsoNormal">On Thu, Jan 23, 2020 at 6:23 PM Shaozhong SHI <<a href="mailto:shishaozhong@gmail.com" onclick="parent.window.location.href='mailto:shishaozhong@gmail.com'; return false;" target="_blank">shishaozhong@gmail.com</a>> wrote:<br/>
><br/>
> I used pg_dump to dump a table with from.  Then, I used psql to load it to another database, but it showed numerous errors.<br/>
><br/>
> Why does that happen?<br/>
<br/>
Hi,<br/>
<br/>
You are not providing any information to debug the issue. The<br/>
following information would help:<br/>
- Postgresql and Postgis version of both the source and target database.<br/>
- The command used to dump the data.<br/>
- The command used to import the data.<br/>
- The error messages.<br/>
<br/>
<br/>
--<br/>
Raúl Marín Rodríguez<br/>
<a href="http://carto.com" target="_blank">carto.com</a><br/>
_______________________________________________<br/>
postgis-users mailing list<br/>
<a href="mailto:postgis-users@lists.osgeo.org" onclick="parent.window.location.href='mailto:postgis-users@lists.osgeo.org'; return false;" target="_blank">postgis-users@lists.osgeo.org</a><br/>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org <a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></div>
</div>
</div>
</div></div></body></html>