File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
packages/transform/src/transformers Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -986,6 +986,21 @@ export class V13ToV14Transformer {
986986 'collation_for'
987987 ] ;
988988
989+ // Handle pg_collation_for specifically - depends on pg_catalog prefix
990+ if ( funcname . toLowerCase ( ) === 'pg_collation_for' ) {
991+ // Check if the function has pg_catalog prefix by examining the node
992+ if ( node && node . funcname && Array . isArray ( node . funcname ) && node . funcname . length >= 2 ) {
993+ const firstElement = node . funcname [ 0 ] ;
994+ if ( firstElement && typeof firstElement === 'object' && 'String' in firstElement ) {
995+ const prefix = firstElement . String . str || firstElement . String . sval ;
996+ if ( prefix === 'pg_catalog' ) {
997+ return 'COERCE_SQL_SYNTAX' ;
998+ }
999+ }
1000+ }
1001+ return 'COERCE_EXPLICIT_CALL' ;
1002+ }
1003+
9891004 if ( explicitCallFunctions . includes ( funcname . toLowerCase ( ) ) ) {
9901005 return 'COERCE_EXPLICIT_CALL' ;
9911006 }
You can’t perform that action at this time.
0 commit comments