Comments (2)
Modern versions of postgres don't treat backslash as an escape character in regular string literals:
leafo=# select '\''hello';
?column?
----------
\'hello
(1 row)
leafo=# select 'hello\nhello';
?column?
--------------
hello\nhello
(1 row)
From the documentation:
If the configuration parameter standard_conforming_strings is off, then PostgreSQL recognizes backslash escapes in both regular and escape string constants. However, as of PostgreSQL 9.1, the default is on, meaning that backslash escapes are recognized only in escape string constants.
I do not mention anywhere that 9.1 or above should be used, and that the default settings should not be changed though.
from pgmoon.
Thanks, that's pretty much what I figured. I'll be sure to use the most up-to-date version of PostgreSQL in my projects. I suppose it may be worthwhile to mention in the README that this library is designed for 9.1+.
from pgmoon.
Related Issues (20)
- support ipv6 by using luasocket HOT 1
- What should I do if error happens when using pg:query ? HOT 1
- Implement extended query protocol HOT 1
- attempt to call method 'keepalive' (a nil value) HOT 1
- [PostgreSQL 14.1] Why is the connection wrong and the encryption method is scram-sha-256? HOT 2
- It works in neovim!
- unable to read data from frontend HOT 4
- bad request on repeated requests HOT 3
- multi-hosts HOT 1
- pgmoon support automatic master-slave switch HOT 1
- Add locking to query functions HOT 1
- authentication exchange unsuccessful in postgresql 15 scram-sha-256 in scram_sha_256_auth
- lua entry thread aborted: runtime error: attempt to yield across C-call boundary HOT 2
- multiple statements in one query HOT 2
- Support all array types
- postgres:query() does not return error as 2. parameter
- Socket pool getreusedtimes function HOT 1
- Pool violation after v1.13 HOT 2
- Connection pooling outside of OpenResty?
- which pgmoon version can connect to postgresql 15 ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgmoon.