Giter Site home page Giter Site logo

Uppercase names about pq HOT 1 CLOSED

lib avatar lib commented on August 21, 2024
Uppercase names

from pq.

Comments (1)

fdr avatar fdr commented on August 21, 2024 1

The problem is probably a need or double-quoting. By default PostgreSQL will case fold identifiers:

fdr=> create temporary table HeLlO(a int);
CREATE TABLE
fdr=> insert into hello values (1);
INSERT 0 1

However, if double quoted, the cases are preserved, and note that an unquoted case rendition will not work, and has its identifier case folded:

fdr=> create temporary table "HeLlO"(a int)
fdr=> insert into HeLlO values (1);
ERROR:  relation "hello" does not exist
LINE 1: insert into HeLlO values (1);

The solution is to double quote the identifier in your query:

fdr=> insert into "HeLlO" values (1);
INSERT 0 1

Since pq is pretty much unaware (to wit) of schema objects and just concerns itself with monolithic query text, I don't think this is a bug for pq unless I am forgetting something.

from pq.

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.