Database Reference
In-Depth Information
for table "prism": ERROR: function
st_bandmetadata(postgis.raster,
integer[]) does not exist
LINE 1: SELECT
array_agg(pixeltype)::text[] FROM
st_bandmetadata($1...
WeinstalledPostGISinthe
postgis
schema,butthedatabaseservercan't
find the
ST_BandMetadata()
function. If a function cannot be found, it is
usually an issue with
search_path
. We will fix this issue in the next step.
8. Check what
pg_restore
actually does by executing the following com-
mand:
pg_restore -f chapter10.sql
--schema=public chapter10.backup
9. Looking at the
COPY
statement for the prism table, everything looks fine.
But the
search_path
parameter preceding the table does not include the
postgis
schema as follows:
SET search_path = public, pg_catalog;
10. Changethe
search_path
valuein
chapter10.sql
toincludethe
post-
gis
schema by executing the following command:
SET search_path = public, postgis,
pg_catalog;
11. Run
chapter10.sql
with
psql
, as follows; the original
chapter-
10.backup
file can't be used because the necessary change can't be ap-
plied with
pg_restore
:
> psql -d new10 -f chapter10.sql