You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using nested arrays in a where statement causes an error in
importpostgresfrom'postgres';constsql=postgres('postgres:///',{prepare: false,});constvalues=[[]];constres=awaitsql`SELECT a, b FROM fner WHERE (a, b) IN (${sql(values)})`;console.log(res);
This is the output from running this code where the first line is a console.log from sql on line 112 of index.js
[ 'SELECT a, b FROM fner WHERE (a, b) IN (', ')' ] [ Builder { first: [ [] ], rest: [] } ]
node:internal/process/esm_loader:40
internalBinding('errors').triggerUncaughtException(
^
TypeError: str.replace is not a function
at escape (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:217:20)
at file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:213:22
at Array.map (<anonymous>)
at escapeIdentifiers (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:213:13)
at Object.select [as fn] (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:139:12)
at Builder.build (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:71:17)
at stringifyValue (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:109:38)
at stringify (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/types.js:100:16)
at build (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/connection.js:223:20)
at execute (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/connection.js:167:7)
at cachedError (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/query.js:170:23)
at new Query (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/query.js:36:24)
at sql (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/index.js:113:11)
at file:///home/admin/proto-0.14.0-747-g66d563cf/lib/build/testanotheridea.js:11:22
at cachedError (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/query.js:170:23)
at new Query (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/query.js:36:24)
at sql (file:///home/admin/proto-0.14.0-747-g66d563cf/node_modules/.pnpm/postgres@3.4.3/node_modules/postgres/src/index.js:113:11)
This was working on version 3.3.5 and when we upgraded to 3.4.3 this error started showing up for us. Let me know how I can help.
The text was updated successfully, but these errors were encountered:
Using nested arrays in a where statement causes an error in
This is the output from running this code where the first line is a
console.log
fromsql
on line 112 of index.jsThis was working on version 3.3.5 and when we upgraded to 3.4.3 this error started showing up for us. Let me know how I can help.
The text was updated successfully, but these errors were encountered: