<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<pre><span class="k">Hi,
Export the project from the database to the file system:
copy</span> <span class="p">(</span><span class="k">SELECT</span> <span
class="n">encode</span><span class="p">(</span><span class="n">content</span><span
class="p">,</span> <span class="s1">'hex'</span><span class="p">)</span> <span
class="k">FROM</span> <span class="k">public</span><span class="p">.</span><span
class="n">qgis_projects</span> <span class="k">where</span> <span
class="n">name</span> <span class="o">=</span> <span class="s1">'</span>my_project<span
class="s1">'</span><span class="p">)</span> <span class="k">to</span> <span
class="s1">'/tmp/project.hex'</span><span class="p">;
</span><span></span><span class="nb">cd</span> /tmp
xxd -p -r project.hex > project.qgz
I hope it helps,
Jorge
</pre>
<p></p>
<div class="moz-cite-prefix">On 19/06/24 19:56, Thayer Young via
QGIS-User wrote:<br>
</div>
<blockquote type="cite"
cite="mid:244849553.7862299.1718823367107@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="yahoo-style-wrap"
style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;">
<div dir="ltr" data-setdir="false">I am wondering if anyone has
any ideas of how I can recover a project that is stored in a
PostGIS database. When I try to open the project it loads
indefinitely (I shut it off after a few hours) for a project
that used to load in a minute or so. There is no network
activity to suggest that the loading is due to data transfer,
etc.. The individual layers load from the database without any
problem, so I don't think it is a question of the connection.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">I tried the following query </div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">
<div>
<div dir="ltr" data-setdir="false">SELECT "name", <br>
convert_from(decode(encode(qgis_projects.content,
'escape'),'escape'), 'Latin1') AS project_latin1,<br>
encode(qgis_projects.content, 'escape') AS project_hex<br>
FROM qgis_projects <br>
WHERE "name" = 'my_project'</div>
</div>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">but with Latin1 and UTF8 I
get an error stating
<div><span
style="color: rgb(34, 34, 34); font-family: "Source Code Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; font-style: normal; font-weight: 400; letter-spacing: 0.14994px; text-indent: 0px; text-transform: none; word-spacing: 0px; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">ERROR:
invalid byte sequence for encoding "UTF8": 0x00 SQL state:
22021</span></div>
<br>
</div>
<div dir="ltr" data-setdir="false">-Thayer<br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-User mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
</blockquote>
</body>
</html>