EDB Postgres Advanced Server SQL Parser for Java

General SQL Parser (GSP) parses EDB Postgres Advanced Server with a dedicated, hand-tuned grammar — full AST access, offline syntax validation, formatting, rewriting, and column-level data lineage, including complete procedural SQL support. One commercial SDK — EDB Postgres Advanced Server is available in the Java edition.

Weekly
release cadence — dialect fixes ship in days

EDB Postgres Advanced Server SQL that GSP parses

CREATE OR REPLACE PACKAGE emp_pkg IS
  PROCEDURE hire_emp(p_name VARCHAR2);
  FUNCTION get_salary(p_id NUMBER) RETURN NUMBER;
END emp_pkg;

Parse it in Java

import gudusoft.gsqlparser.*;

TGSqlParser parser = new TGSqlParser(EDbVendor.dbvedb);
parser.sqltext = sql; // the EDB Postgres Advanced Server SQL above
if (parser.parse() == 0) {
    System.out.println(parser.sqlstatements.size() + " statement(s) parsed");
} else {
    System.out.println(parser.getErrormessage());
}

Java edition only. The .NET library has no EDB Postgres Advanced Server grammar, so this dialect cannot be parsed from C# or VB.NET. See the .NET SQL Parser SDK for the dialects it does cover.

What GSP handles in EDB Postgres Advanced Server

Beyond parsing, the same AST powers table/column extraction, validation, formatting, and column-level lineage for EDB Postgres Advanced Server.

Recent EDB Postgres Advanced Server parser updates

Full history in the release notes.

EDB Postgres Advanced Server resources

Common questions

Does GSP parse EDB Postgres Advanced Server stored procedures and procedural SQL?

Yes. GSP parses EDB Postgres Advanced Server SPL — packages, procedures, functions, triggers, anonymous DECLARE/BEGIN blocks, cursors, exception handlers, and FORALL / BULK COLLECT bulk operations into a full AST — procedure bodies become real statement trees you can traverse, not opaque text blocks. This is what makes lineage and impact analysis work inside procedural code.

Do I need a live EDB Postgres Advanced Server database connection to validate SQL?

No. GSP validates EDB Postgres Advanced Server syntax completely offline. You get error line and column positions, the offending token, and a hint — with no server, driver, or credentials involved.

Can I use the EDB Postgres Advanced Server parser from C# / .NET?

Not currently. EDB Postgres Advanced Server is a Java-edition dialect — the .NET library ships 15 dedicated grammars and EDB Postgres Advanced Server is not one of them, so there is no C# code path for it. Everything else on this page describes the Java SDK. If you need EDB Postgres Advanced Server in .NET, email info@sqlparser.com; customer demand is how dialects get prioritized for the .NET port.

Can GSP extract column-level lineage from EDB Postgres Advanced Server SQL?

Yes. The built-in DataFlowAnalyzer produces column-level lineage, impact analysis, and call graphs from EDB Postgres Advanced Server scripts — it is the engine behind Gudu SQLFlow and the lineage integrations for DataHub and OpenMetadata.