Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected identifier with pg versions > 2.3.1 #507

Merged
merged 1 commit into from
Jan 22, 2014
Merged

Unexpected identifier with pg versions > 2.3.1 #507

merged 1 commit into from
Jan 22, 2014

Conversation

brianc
Copy link
Owner

@brianc brianc commented Jan 22, 2014

CREATE TABLE test_table (bar integer, "baz's" integer);
INSERT INTO test_table (bar, "baz's") VALUES(1, 1), (2, 2);
myDb('SELECT * FROM test_table', function(err, rows, result) {
  console.dir(err);
  console.dir(rows);
  console.dir(result);
});

Running the above query returns an error using anything above pg version 2.3.1. The exact message is below.

SyntaxError: Unexpected identifier
    at Function (<anonymous>)
    at Result.addFields (/Users/abcd/node_modules/pg/lib/result.js:91:18)
    at Query.handleRowDescription (/Users/abcd/node_modules/pg/lib/query.js:58:16)
    at null.<anonymous> (/Users/abcd/node_modules/pg/lib/client.js:102:24)
    at EventEmitter.emit (events.js:95:17)
    at null.<anonymous> (/Users/abcd/node_modules/pg/lib/connection.js:97:12)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:746:14)
    at Socket.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)

@brianc
Copy link
Owner

brianc commented Jan 22, 2014

hmm very strange - looking into this now - thanks for the comprehensive bug report.

Also rename some test files so they match the Makefile regex.  They will be included in the test suite from now on.
@brianc
Copy link
Owner

brianc commented Jan 22, 2014

This should fix your problem. 😄 Sorry for the headache!

brianc added a commit that referenced this pull request Jan 22, 2014
Unexpected identifier with pg versions > 2.3.1
@brianc brianc merged commit 62f6b2f into master Jan 22, 2014
@brianc brianc deleted the issues/507 branch January 22, 2014 14:43
@brianc
Copy link
Owner

brianc commented Jan 22, 2014

Released a new patch version with the fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant