Skip to content

postgresql TRIM not fully supported? #868

@localdevjs

Description

@localdevjs
create table test1 as (
    select 
		aaaa,
		trim(BOTH from unnest(string_to_array(initcap(bbbbb),';'))) as ccccc
    from mytable
);;

That trim function there works in postgresql, but throws an error in the JSQLParser. Stack trace:

	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatements(CCJSqlParserUtil.java:137)
	at com.shonetic.esquel.analyzer.tester.run(tester.java:30)
	at com.shonetic.util2.ScriptClass.doMain(ScriptClass.java:240)
	at com.shonetic.esquel.analyzer.tester.main(tester.java:36)
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
    at line 4, column 7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions