mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Add note about case sensitivity of result of pg.escapeIdentifier (#2993)
This commit is contained in:
parent
d59cd15ed2
commit
4dbf1af069
@ -14,6 +14,9 @@ const escapedIdentifier = escapeIdentifier('FooIdentifier')
|
||||
console.log(escapedIdentifier) // '"FooIdentifier"'
|
||||
```
|
||||
|
||||
<Alert>
|
||||
**Note**: When using an identifier that is the result of this function in an operation like `CREATE TABLE ${escapedIdentifier(identifier)}`, the table that is created will be CASE SENSITIVE. If you use any capital letters in the escaped identifier, you must always refer to the created table like `SELECT * from "MyCaseSensitiveTable"`; queries like `SELECT * FROM MyCaseSensitiveTable` will result in a "Non-existent table" error since case information is stripped from the query.
|
||||
</Alert>
|
||||
|
||||
### pg.escapeLiteral
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user