<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#467886" vlink="#96607D" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Not sure what you mean by unintentionally dumped as binary format.  That is the preferred way.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What you should do is the following:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Create a blank database.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Run <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>CREATE EXTENSION postgis;<o:p></o:p></p><p class=MsoNormal>CREATE EXTENSION postgis_raster;<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Then restore your database into the new one you created.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The only thing that should happen assuming you have an individual backup for your database, is that it will failing when doing CREATE EXTENSION postgis;  which is fine and expected.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>But your raster data will find the datatype and functions it needs in postgis_raster so should do fine.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><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'> David Haynes <haynesd2@gmail.com> <br><b>Sent:</b> Tuesday, February 10, 2026 1:28 AM<br><b>To:</b> postgis-users@lists.osgeo.org<br><b>Subject:</b> PG_Restore error<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hello,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I have an old PostgreSQL database dump file that uses the old PostGIS extension. What I mean is that the database was created when the extension used to be CREATE Extension PostGIS. Now there are at least 2 commands: CREATE Extension postgis and  CREATE Extension postgis_raster; This particular database has both vector and raster datasets. To complicate matters, I unintentionally dumped it in a binary format. <br><br>I have been somewhat successful in getting the DB to load. I'm using a pg_restore command using the following flags (--no-owner --create --clean). However, I get a lot of errors because the database can not create raster datasets as that datatype does not exist. Is there a command that I can issue during this pg_restore process to initialize the postgis_raster extension? If not, what are my next steps? Do I need to load the database onto an older version of PostGIS?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks for any feedback<o:p></o:p></p></div></div></div></div></body></html>