Menu

#469 Postgres: Save Dataset Adds Quotation Marks

OJ_future
open
nobody
Windows
5
2020-08-29
2018-04-11
No

When I perform a File -Save Dataset As => Save to PostGIS Table, select the radio "Cread new or replace..." the table that is creates has column names wrapped with double quotation marks.

This was very confusing as when I tried to perform some queries, I kept getting column not found and then I realized I had to include quotation marks around the column name.

So this works:

select distinct("MAINTENANC"), count(*)
from kimselect 
group by "MAINTENANC"
order by "MAINTENANC"

whereas this fails:

select distinct(MAINTENANC), count(*)
from kimselect 
group by MAINTENANC
order by MAINTENANC

I should like to be able to create a table that matches the attributes/features name without having to include quotation marks.

Related

Bugs: #469

Discussion

  • michael michaud

    michael michaud - 2018-04-11

    Hi John,

    I know this is an annoying problem. The recommended way to write to PostGIS is now to use the Postgis driver (new) which is a driver able to read/write from and to postgis, and which has some more options like "normalize table name" and "normalize column name" to solve the case sensitivity problem you are mentionning.
    I just noticed several problems with this driver in the current source code (see new bug reports). I think the version included in the last release (1.12) is usable though.

     
  • ede

    ede - 2018-04-11

    hearing "quotes" i remember this change
    https://sourceforge.net/p/jump-pilot/code/5489/

    might have nothing to do with it though.. ede

    On 11.04.2018 06:09, John L. Poole wrote:


    [bugs:#469] https://sourceforge.net/p/jump-pilot/bugs/469/ Postgres: Save Dataset Adds Quotation Marks

    Status: open
    Labels: postgis dataset
    Created: Wed Apr 11, 2018 04:09 AM UTC by John L. Poole
    Last Updated: Wed Apr 11, 2018 04:09 AM UTC
    Owner: nobody

    When I perform a File -Save Dataset As => Save to PostGIS Table, select the radio "Cread new or replace..." the table that is creates has column names wrapped with double quotation marks.

    This was very confusing as when I tried to perform some queries, I kept getting column not found and then I realized I had to include quotation marks around the column name.

    So this works:

    select distinct("MAINTENANC"), count(*)
    from kimselect
    group by "MAINTENANC"
    order by "MAINTENANC"

    whereas this fails:

    select distinct(MAINTENANC), count(*)
    from kimselect
    group by MAINTENANC
    order by MAINTENANC

    I should like to be able to create a table that matches the attributes/features name without having to include quotation marks.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/jump-pilot/bugs/469/

    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #469

  • michael michaud

    michael michaud - 2020-08-29

    I can port the "normalize table name", "normalize column name" to the old postgis writer. Can be done before or after migration. Not a blocking feature

     
  • ede

    ede - 2020-08-29
    • Milestone: --> OJ_future
     
  • ede

    ede - 2020-08-29

    let's tag it as future then

     

Log in to post a comment.

MongoDB Logo MongoDB