Coder Social home page Coder Social logo

postgres driver query bug ? about osgearth HOT 7 CLOSED

gwaldron avatar gwaldron commented on July 24, 2024
postgres driver query bug ?

from osgearth.

Comments (7)

remoe avatar remoe commented on July 24, 2024

Hi

When you look at the documentation of PostGres then table names are identifiers also in older versions:

http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html
http://www.postgresql.org/docs/9.1/static/sql-syntax-lexical.html

This can be quoted with double-quotes but NOT with single quotes.

Can someone please confirm this ? Thanks.

from osgearth.

gwaldron avatar gwaldron commented on July 24, 2024

Remo,

I guess the issue is that different back ends have different syntax. So somehow we need to account for that. Any suggestions?

from osgearth.

remoe avatar remoe commented on July 24, 2024

Glenn, but please look at the lexical - docs. It says that single quotes are not correct.

from osgearth.

gwaldron avatar gwaldron commented on July 24, 2024

Not correct for Postgres. But they are correct for OGR SQL, and possibly other OGR drivers. When the back-end driver supports SQL, OGR passes the SQL string along to the driver. But different drivers supports different flavors of SQL. I'm saying we need a way to account for that.

from osgearth.

remoe avatar remoe commented on July 24, 2024

Ok, thanks. I need to read some docs and code ;)

from osgearth.

jasonbeverage avatar jasonbeverage commented on July 24, 2024

Remo, try doing a pull and see if it works for you now. I made a change to only quote the table name if contains spaces and I'm also checking to see if the driver is PostgreSQL, and if it is using double quotes instead of single quotes as the delimiter.

from osgearth.

remoe avatar remoe commented on July 24, 2024

@jasonbeverage , thanks, it works now.

from osgearth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.