-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add quoting to postgis raster driver #837
Conversation
@@ -342,9 +342,6 @@ def ogr_nas_5(): | |||
ogr_nas_4, | |||
ogr_nas_5] | |||
|
|||
# NAS tests disabled for now | |||
gdaltest_list = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is unrelated to the commit
@@ -74,7 +74,11 @@ static int OGRNASDriverIdentify( GDALOpenInfo* poOpenInfo ) | |||
if( strstr(szPtr,"opengis.net/gml") == nullptr ) | |||
return FALSE; | |||
|
|||
char **papszIndicators = CSLTokenizeStringComplex(CPLGetConfigOption("NAS_INDICATOR", ""), ";", 0, 0 ); | |||
char **papszIndicators = CSLTokenizeStringComplex( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated change
|
||
<p>The former default of "NAS-Operationen;AAA-Fachschema;aaa.xsd;aaa-suite" was | ||
removed and has now to be explicitly specified to enable detection.</p> | ||
separated strings listed in the option <b>NAS_INDICATOR</b> (which defaults to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated change
oh, looking closer, I didn't see there was a separate commit for the change in NAS, so this is probably OK (although a bit confusing to be conflated in this PR) |
3394681
to
ccf43d7
Compare
ccf43d7
to
e12a0fc
Compare
Yes sorry. The NAS change is just one pending in my branch, that just reverts the recent changes back to how it was before (OGR_SKIP=NAS should be ok after all). With the PR I actually only wanted to trigger test - which miserably failed - although the failures seem unrelated to the changes. |
I've restarted the failed jobs |
CPLString osColumnI(CPLQuotedSQLIdentifier(pszColumn)); | ||
CPLString osSrcColumnI(CPLQuotedSQLIdentifier(poSrcDS->pszSchema)); | ||
CPLString osSrcSchemaI(CPLQuotedSQLIdentifier(poSrcDS->pszTable)); | ||
CPLString osSrcTableI;(CPLQuotedSQLIdentifier(poSrcDS->pszColumn)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extraneous ; between osSrcTableI and CPLQuoted...
@@ -3526,7 +3553,7 @@ PostGISRasterDataset::CreateCopy( CPL_UNUSED const char * pszFilename, | |||
|
|||
osCommand.Printf("create index %s_%s_gist ON %s.%s USING gist " | |||
"(st_convexhull(%s));", pszTable, pszColumn, | |||
pszSchema, pszTable, pszColumn); | |||
osSchemaI.c_str(), osTableI.c_str(), osColumnI.c_str()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the index name %s_%s_gist itself should be quoted
@@ -2104,12 +2120,12 @@ const char * pszValidConnectionString) | |||
papszSubdatasets[2 * i] = | |||
CPLStrdup(CPLSPrintf("SUBDATASET_%d_NAME=PG:%s schema=%s table=%s column=%s " | |||
"where='%s = %s'", i+ 1, pszValidConnectionString, | |||
pszSchema, pszTable, pszColumn, pszPrimaryKeyName, | |||
pszSchema, pszTable, pszColumn, osPrimaryKeyNameI.c_str(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pszSchema, pszTable, pszColumn should probably be quoted too, but I'm not sure the Open() parsing code is ready for it. Actually looking at autotest/gdrivers/postgisraster.py , it seems ready for single quoting, at least for table name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should work - Looks like what helped in qgis/QGIS@f4d08eb926
Looks good to me. I let you merge |
What does this PR do?
add quoting to the postgisraster driver - untested, here to trigger tests…
What are related issues/pull requests?
https://issues.qgis.org/issues/19583
Tasklist
Environment
Provide environment details, if relevant: