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
I'm trying to get binary support working, and have a minimal proof of concept here:
constpg=require("pg");pg.types.setTypeParser(1184,"binary",(value)=>value===null ? null : value.readBigInt64BE(0),);asyncfunctiongetTimestamptzAsBigInt(){constclient=newpg.Client({host: "localhost",user: "postgres",password: "postgres",database: "postgres",port: 5432,binary: true,});awaitclient.connect();constresult=awaitclient.query({text: "SELECT current_timestamp;",queryMode: 'extended',});// This should be a BigInt representing number of microseconds// since midnight, January 1st, 2000console.log(result.rows[0].current_timestamp);awaitclient.end();}getTimestamptzAsBigInt().catch(console.error);
Hello, thanks for a wonderful pg library!
I'm trying to get binary support working, and have a minimal proof of concept here:
But it requires a some minor patches: #3316
Wdyt?
The text was updated successfully, but these errors were encountered: