Skip to content

Commit 88ce80b

Browse files
committed
Fix sql() identify command
1 parent 9285875 commit 88ce80b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ function Postgres(url, options) {
5151
, listeners = {}
5252
, typeArrayMap = {}
5353
, files = {}
54-
, isInsert = /(^|\))\s*insert\s*into\s/i
55-
, isSelect = /(^|\))\s*select\s/i
54+
, isInsert = /(^|[^)(])\s*insert\s+into\s+[^\s]+\s*$/i
55+
, isSelect = /(^|[^)(])\s*select\s*$/i
5656

5757
function postgres(xs, ...args) {
5858
return query({}, getConnection(), xs, args)

0 commit comments

Comments
 (0)