File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
modules/module-postgres/src/types Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -62,13 +62,16 @@ WHERE t.oid = ANY($1)
6262 if ( ! this . registry . knows ( oid ) ) {
6363 // This type is an array of another custom type.
6464 const inner = Number ( element_type ) ;
65- requireType ( inner ) ;
66- this . registry . set ( oid , {
67- type : 'array' ,
68- innerId : inner ,
69- separatorCharCode : ( delim as string ) . charCodeAt ( 0 ) ,
70- sqliteType : ( ) => 'text' // Since it's JSON
71- } ) ;
65+ if ( inner != 0 ) {
66+ // Some array types like macaddr[] don't seem to have their inner type set properly - skip!
67+ requireType ( inner ) ;
68+ this . registry . set ( oid , {
69+ type : 'array' ,
70+ innerId : inner ,
71+ separatorCharCode : ( delim as string ) . charCodeAt ( 0 ) ,
72+ sqliteType : ( ) => 'text' // Since it's JSON
73+ } ) ;
74+ }
7275 }
7376 break ;
7477 case 'c' :
You can’t perform that action at this time.
0 commit comments