-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #935 from jkgeyti/master
Support querying tables with column names with multiple apostrophes
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
var helper = require(__dirname + '/../test-helper'); | ||
var pg = helper.pg; | ||
|
||
test('support for complex column names', function() { | ||
pg.connect(helper.config, assert.success(function(client, done) { | ||
client.query("CREATE TEMP TABLE t ( \"complex''column\" TEXT )"); | ||
client.query('SELECT * FROM t', assert.success(function(res) { | ||
done(); | ||
assert.strictEqual(res.fields[0].name, "complex''column"); | ||
pg.end(); | ||
})); | ||
})); | ||
}); |