[postgis-users] Raster Table Name With Upper-Case Characters

Hugues François hugues.francois at irstea.fr
Fri Jul 14 00:51:11 PDT 2017


Hi, 

I did some test using shp2pgsql because I didn't have available raster data on the computer I use from my holidays place. 

It seems that it changes upper to lower case and already uses double quotes. Maybe, you coud try to proceed in several steps: first saving the output file of raster2pgsql, then uses sed to change its content with the correct syntax and finally uses psql command to execute le sql command file. 

Regards, 

Hug 




De: "Osahon Oduware" <osahon.gis at gmail.com> 
À: "PostGIS Users Discussion" <postgis-users at lists.osgeo.org> 
Envoyé: Jeudi 13 Juillet 2017 14:41:27 
Objet: Re: [postgis-users] Raster Table Name With Upper-Case Characters 

Hi Hugues, 

Using the backslash to escape the quotes as you suggested produces a syntax error. 

On Thu, Jul 13, 2017 at 12:36 PM, Osahon Oduware < [ mailto:osahon.gis at gmail.com | osahon.gis at gmail.com ] > wrote: 



Hi Hugues, 

I would try this out and give you feedback. Thanks. 

On Thu, Jul 13, 2017 at 12:32 PM, Hugues François < [ mailto:hugues.francois at irstea.fr | hugues.francois at irstea.fr ] > wrote: 

BQ_BEGIN

Yes, that's what I mean. I didn't try it but I think you need to tell raster2pgsql that double quotes are part of the string and not a simple text delimiter. 

It could look like something like this: 
raster2pgsql raster_options_go_here raster_file someschema.\"sometable\" 

Hug 

Le 13 juil. 2017 1:13 PM, Osahon Oduware < [ mailto:osahon.gis at gmail.com | osahon.gis at gmail.com ] > a écrit : 

BQ_BEGIN

Hi Hugues, 

Thanks for your response. Do you mean escape with a backslash as is done with most programming languages? Please, provide an example. 

On Thu, Jul 13, 2017 at 11:27 AM, Hugues François < [ mailto:hugues.francois at irstea.fr | hugues.francois at irstea.fr ] > wrote: 

BQ_BEGIN

Hi, 

Did you try to escape double quotes in the raster2pgsql command line ? 

Regards, 
Hug 


Le 13 juil. 2017 12:21 PM, Osahon Oduware < [ mailto:osahon.gis at gmail.com | osahon.gis at gmail.com ] > a écrit : 

BQ_BEGIN

Hi All, 

I wanted to know if there is a way to specify a raster table name with Upper-Case characters using the raster2pgsql tool . I have tried enclosing the table name in double-quotes, but the raster2pgsql tool seems to convert it to Lower-Case characters. 

Knowing how to do this would save me from the current challenge of renaming the raster table after they have been created (see the link below): 
[ https://groups.google.com/forum/#!searchin/postgis-users/Renaming$20Raster$20Table%7Csort:relevance/postgis-users/MKI7pvko6q0/Oqfqw9nUBAAJ | Renaming Raster Table ] 

I would be glad if someone could help me with this. 





_______________________________________________ 
postgis-users mailing list 
[ mailto:postgis-users at lists.osgeo.org | postgis-users at lists.osgeo.org ] 
[ https://lists.osgeo.org/mailman/listinfo/postgis-users | https://lists.osgeo.org/mailman/listinfo/postgis-users ] 

BQ_END



BQ_END



_______________________________________________ 
postgis-users mailing list 
[ mailto:postgis-users at lists.osgeo.org | postgis-users at lists.osgeo.org ] 
[ https://lists.osgeo.org/mailman/listinfo/postgis-users | https://lists.osgeo.org/mailman/listinfo/postgis-users ] 

BQ_END



BQ_END



_______________________________________________ 
postgis-users mailing list 
postgis-users at lists.osgeo.org 
https://lists.osgeo.org/mailman/listinfo/postgis-users 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20170714/c5848afc/attachment.html>


More information about the postgis-users mailing list