<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.cmsws.com/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>CMS Web Services - linux:database:postgresql</title>
        <description></description>
        <link>https://www.cmsws.com/wiki/</link>
        <lastBuildDate>Thu, 30 Apr 2026 04:04:28 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.cmsws.com/wiki/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>CMS Web Services</title>
            <link>https://www.cmsws.com/wiki/</link>
        </image>
        <item>
            <title>change_to_utf8_encoding</title>
            <link>https://www.cmsws.com/wiki/doku.php?id=linux:database:postgresql:change_to_utf8_encoding&amp;rev=1619051652&amp;do=diff</link>
            <description>Change default encoding to UTF-8

References:

	*  &lt;https://www.endpoint.com/blog/2017/07/21/postgres-migrating-sqlascii-to-utf-8&gt;
	*  &lt;https://www.shubhamdipt.com/blog/how-to-change-postgresql-database-encoding-to-utf8/&gt;

NOTE: Never perform this work on a database that is being written to.  For my example a DB used by a very busy instance of Zabbix.

Verify current server encoding


root@zabdb:~ # psql -U zabbix zabbix
psql (11.9)
Type &quot;help&quot; for help.

zabbix=&gt; SHOW SERVER_ENCODING;
 server_e…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 22 Apr 2021 00:34:12 +0000</pubDate>
        </item>
        <item>
            <title>import_with_copy</title>
            <link>https://www.cmsws.com/wiki/doku.php?id=linux:database:postgresql:import_with_copy&amp;rev=1560541565&amp;do=diff</link>
            <description>Using PostgreSQL.  To export table data, perform the following command:
sudo -u system_user psql -d database -c &quot;\copy (SELECT * FROM table_name) to &#039;/tmp/output_data.csv&#039; (format csv, delimiter &#039;,&#039;) &quot;
To import the data, use this command:
sudo -u system_user psql -d database -c &quot;\copy table_name FROM &#039;/tmp/import_data.csv&#039; (format csv, delimiter &#039;,&#039;)&quot;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 14 Jun 2019 19:46:05 +0000</pubDate>
        </item>
    </channel>
</rss>
