Skip to content

Commit 37e87e0

Browse files
jasonfordthijs
authored and
thijs
committed
Add note about case sensitivity of result of pg.escapeIdentifier (brianc#2993)
1 parent 1d29d64 commit 37e87e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/pages/apis/utilities.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const escapedIdentifier = escapeIdentifier('FooIdentifier')
1414
console.log(escapedIdentifier) // '"FooIdentifier"'
1515
```
1616

17+
<Alert>
18+
**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.
19+
</Alert>
1720

1821
### pg.escapeLiteral
1922

0 commit comments

Comments
 (0)