Re: [postgis-users] Error on a raster table restore

2016-01-28 Thread David Haynes
The problem is with pg_restore for raster tables not in the public schema
use this url for reference. https://trac.osgeo.org/postgis/ticket/2485#no1

This is a fix I have implemented that seems to work, I might have all of
the raster_constraint functions though...
SHOW search_path'

Alter the following functions to include the pg_catalog in the search path.
Alter Function _raster_constraint_nodata_values (raster) SET
Search_path="$user", pg_catalog,public;
Alter Function _raster_constraint_out_db (raster) SET Search_path="$user",
pg_catalog,public;
Alter Function _raster_constraint_pixel_types(raster) SET
Search_path="$user", pg_catalog,public;
Alter Function _overview_constraint(raster, integer, name, name, name)  SET
Search_path="$user", pg_catalog,public;

now try restore command



On Wed, Jan 20, 2016 at 10:35 AM, Cedric Duprez 
wrote:

> Yes, the function ST_BandMetadata, with the right parameters, is in my
> public functions list.
> Both full versions of postgis and postgresql are the same.
>
>
> Le 15/01/2016 10:21, Tom van Tilburg a écrit :
>
> Just checking the obvious:
> Is there a function ST_BandMetedata in your functions list?
> And what is the full version output of the original server?
>
>
> On Fri, 15 Jan 2016 at 10:03 Cedric Duprez < 
> cedric.dup...@ign.fr> wrote:
>
>> Hi Tom,
>>
>> Thanks for your answer.
>> I am sure that rasters are enabled in my postgis dbase (the first thing
>> I checked). Raster functions are in the public schema.
>> This is the result of SELECT postgis_full_version() :
>> POSTGIS="2.1.0 r11822" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6
>> March 2012" GDAL="GDAL 1.11.0, released 2014/04/16" LIBXML="2.9.1"
>> LIBJSON="UNKNOWN" TOPOLOGY RASTER
>>
>> Cedric
>>
>> Le 15/01/2016 09:09, Tom van Tilburg a écrit :
>> >
>> > Cedric,
>> >
>> > Are you sure rasters are enabled in your new postgis dbase? Please
>> > check for the existence  of raster functions (st_bandmetadata in
>> > particular) in public.functions and run SELECT postgis_full_version()
>> >
>> > Tom
>> >
>> >
>> >
>> > ___
>> > postgis-users mailing list
>> > postgis-users@lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/postgis-users
>> ___
>> postgis-users mailing list
>> postgis-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
>
> ___
> postgis-users mailing 
> listpostgis-users@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/postgis-users
>
>
>
> ___
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
>
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

Re: [postgis-users] Error on a raster table restore

2016-01-20 Thread Cedric Duprez
Yes, the function ST_BandMetadata, with the right parameters, is in my public 
functions list.
Both full versions of postgis and postgresql are the same.

Le 15/01/2016 10:21, Tom van Tilburg a écrit :
Just checking the obvious:
Is there a function ST_BandMetedata in your functions list?
And what is the full version output of the original server?


On Fri, 15 Jan 2016 at 10:03 Cedric Duprez 
<cedric.dup...@ign.fr>
 wrote:
Hi Tom,

Thanks for your answer.
I am sure that rasters are enabled in my postgis dbase (the first thing
I checked). Raster functions are in the public schema.
This is the result of SELECT postgis_full_version() :
POSTGIS="2.1.0 r11822" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6
March 2012" GDAL="GDAL 1.11.0, released 2014/04/16" LIBXML="2.9.1"
LIBJSON="UNKNOWN" TOPOLOGY RASTER

Cedric

Le 15/01/2016 09:09, Tom van Tilburg a écrit :
>
> Cedric,
>
> Are you sure rasters are enabled in your new postgis dbase? Please
> check for the existence  of raster functions (st_bandmetadata in
> particular) in public.functions and run SELECT postgis_full_version()
>
> Tom
>
>
>
> ___
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users



___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

Re: [postgis-users] Error on a raster table restore

2016-01-15 Thread Cedric Duprez
Hi Tom,

Thanks for your answer.
I am sure that rasters are enabled in my postgis dbase (the first thing 
I checked). Raster functions are in the public schema.
This is the result of SELECT postgis_full_version() :
POSTGIS="2.1.0 r11822" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 
March 2012" GDAL="GDAL 1.11.0, released 2014/04/16" LIBXML="2.9.1" 
LIBJSON="UNKNOWN" TOPOLOGY RASTER

Cedric

Le 15/01/2016 09:09, Tom van Tilburg a écrit :
>
> Cedric,
>
> Are you sure rasters are enabled in your new postgis dbase? Please 
> check for the existence  of raster functions (st_bandmetadata in 
> particular) in public.functions and run SELECT postgis_full_version()
>
> Tom
>
>
>
> ___
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

Re: [postgis-users] Error on a raster table restore

2016-01-15 Thread Tom van Tilburg
Cedric,

Are you sure rasters are enabled in your new postgis dbase? Please check
for the existence  of raster functions (st_bandmetadata in particular) in
public.functions and run SELECT postgis_full_version()

Tom

On Thu, 14 Jan 2016 14:46 Cedric Duprez  wrote:

> Hi all,
>
> I am trying to copy a raster table (elevation model) from one server to
> another server.
> Both servers have the same configuration : same versions of PostgreSQL
> (9.3.4) and same version of PostGIS (2.1.0).
>
> I perform the backup on the first server like this :
> pg_dump -E UTF-8 -Fc -i -O -x -h prodserver.mydomain.fr -p 5432 -U
> myuser -t myschema.mnt proddb >
> /home/myuser/PostgreSQL/backups/mnt2011.backup
>
> Then, on the second server, I restore the raster table like this :
> pg_restore -O -h testserver.mydomain.fr -p 5432 -j 4 -U myuser -d testdb
> /home/myuser/PostgreSQL/backups/mnt2011.backup
>
> Everything works perfectly until the data insertions, which produce the
> following error message :
> pg_restore: [programme d'archivage (db)] Erreur pendant le traitement de
> la TOC (« PROCESSING TOC ») :
> pg_restore: [programme d'archivage (db)] Erreur à partir de l'entrée TOC
> 4448 ; 0 30751 TABLE DATA mnt myuser
> pg_restore: [programme d'archivage (db)] COPY échoué pour la table « mnt
> » : ERROR:  function st_bandmetadata(public.raster, integer[]) does not
> exist
> LIGNE 1 :  SELECT array_agg(pixeltype)::text[] FROM st_bandmetadata($1...
>  ^
> ASTUCE : No function matches the given name and argument types. You
> might need to add explicit type casts.
> REQUÊTE :  SELECT array_agg(pixeltype)::text[] FROM st_bandmetadata($1,
> ARRAY[]::int[]);
> CONTEXTE : SQL function "_raster_constraint_pixel_types" during inlining
> COPY mnt, line 1: "1
>
> 010100394039C0B76B2941002035325941..."
>
>
> What's wrong ? "public", where the postgis extension is installed, is in
> the databases default search_path value.
>
> Thanks in advance for your help.
>
> Regards,
>
> Cedric
> ___
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

Re: [postgis-users] Error on a raster table restore

2016-01-15 Thread Tom van Tilburg
Just checking the obvious:
Is there a function ST_BandMetedata in your functions list?
And what is the full version output of the original server?


On Fri, 15 Jan 2016 at 10:03 Cedric Duprez  wrote:

> Hi Tom,
>
> Thanks for your answer.
> I am sure that rasters are enabled in my postgis dbase (the first thing
> I checked). Raster functions are in the public schema.
> This is the result of SELECT postgis_full_version() :
> POSTGIS="2.1.0 r11822" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6
> March 2012" GDAL="GDAL 1.11.0, released 2014/04/16" LIBXML="2.9.1"
> LIBJSON="UNKNOWN" TOPOLOGY RASTER
>
> Cedric
>
> Le 15/01/2016 09:09, Tom van Tilburg a écrit :
> >
> > Cedric,
> >
> > Are you sure rasters are enabled in your new postgis dbase? Please
> > check for the existence  of raster functions (st_bandmetadata in
> > particular) in public.functions and run SELECT postgis_full_version()
> >
> > Tom
> >
> >
> >
> > ___
> > postgis-users mailing list
> > postgis-users@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/postgis-users
> ___
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users

[postgis-users] Error on a raster table restore

2016-01-14 Thread Cedric Duprez
Hi all,

I am trying to copy a raster table (elevation model) from one server to 
another server.
Both servers have the same configuration : same versions of PostgreSQL 
(9.3.4) and same version of PostGIS (2.1.0).

I perform the backup on the first server like this :
pg_dump -E UTF-8 -Fc -i -O -x -h prodserver.mydomain.fr -p 5432 -U 
myuser -t myschema.mnt proddb > 
/home/myuser/PostgreSQL/backups/mnt2011.backup

Then, on the second server, I restore the raster table like this :
pg_restore -O -h testserver.mydomain.fr -p 5432 -j 4 -U myuser -d testdb 
/home/myuser/PostgreSQL/backups/mnt2011.backup

Everything works perfectly until the data insertions, which produce the 
following error message :
pg_restore: [programme d'archivage (db)] Erreur pendant le traitement de 
la TOC (« PROCESSING TOC ») :
pg_restore: [programme d'archivage (db)] Erreur à partir de l'entrée TOC 
4448 ; 0 30751 TABLE DATA mnt myuser
pg_restore: [programme d'archivage (db)] COPY échoué pour la table « mnt 
» : ERROR:  function st_bandmetadata(public.raster, integer[]) does not 
exist
LIGNE 1 :  SELECT array_agg(pixeltype)::text[] FROM st_bandmetadata($1...
 ^
ASTUCE : No function matches the given name and argument types. You 
might need to add explicit type casts.
REQUÊTE :  SELECT array_agg(pixeltype)::text[] FROM st_bandmetadata($1, 
ARRAY[]::int[]);
CONTEXTE : SQL function "_raster_constraint_pixel_types" during inlining
COPY mnt, line 1: "1 
010100394039C0B76B2941002035325941..."


What's wrong ? "public", where the postgis extension is installed, is in 
the databases default search_path value.

Thanks in advance for your help.

Regards,

Cedric
___
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-users