PG_Restore error

David Haynes <[email protected]> Tue, 10 Feb 2026 00:28:29 -0600
Newsgroups gmane.comp.gis.postgis
Message-ID <CAM4C04pfAGexHTpetmx0vzyG66pki-+98Um9fBFpFZfqW7CqEQ@mail.gmail.com>
--00000000000087d51a064a725d05
Content-Type: text/plain; charset="UTF-8"

Hello,

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.

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?

Thanks for any feedback

--00000000000087d51a064a725d05
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>I have an old PostgreSQL databas=
e dump file that uses the old PostGIS extension. What I mean is that the da=
tabase was created when the extension used to be CREATE Extension PostGIS. =
Now there are at least 2 commands: CREATE Extension postgis and=C2=A0 CREAT=
E Extension postgis_raster; This particular database has both vector and ra=
ster datasets. To complicate matters, I unintentionally dumped it in a bina=
ry format.=C2=A0<br><br>I have been somewhat successful in getting the DB t=
o load. I&#39;m using a pg_restore command using the following flags (--no-=
owner --create --clean). However, I get a lot of errors because the databas=
e 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 loa=
d the database onto an older version of PostGIS?</div><div><br></div><div>T=
hanks for any feedback</div></div>

--00000000000087d51a064a725d05--