File tree 2 files changed +19
-0
lines changed 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ pg.types.setTypeParser(pg.types.builtins.INT8, (x) => {
12
12
}
13
13
} )
14
14
pg . types . setTypeParser ( pg . types . builtins . DATE , ( x ) => x )
15
+ pg . types . setTypeParser ( pg . types . builtins . INTERVAL , ( x ) => x )
15
16
pg . types . setTypeParser ( pg . types . builtins . TIMESTAMP , ( x ) => x )
16
17
pg . types . setTypeParser ( pg . types . builtins . TIMESTAMPTZ , ( x ) => x )
17
18
pg . types . setTypeParser ( 1115 , parseArray ) // _timestamp
Original file line number Diff line number Diff line change @@ -539,3 +539,21 @@ test('very big number', async () => {
539
539
]
540
540
` )
541
541
} )
542
+
543
+ // issue: https://github.com/supabase/supabase/issues/27626
544
+ test ( 'return interval as string' , async ( ) => {
545
+ const res = await app . inject ( {
546
+ method : 'POST' ,
547
+ path : '/query' ,
548
+ payload : {
549
+ query : `SELECT '1 day 1 hour 45 minutes'::interval` ,
550
+ } ,
551
+ } )
552
+ expect ( res . json ( ) ) . toMatchInlineSnapshot ( `
553
+ [
554
+ {
555
+ "interval": "1 day 01:45:00",
556
+ },
557
+ ]
558
+ ` )
559
+ } )
You can’t perform that action at this time.
0 commit comments