Skip to content

PostgreSQL SQL Parser Support in GSP

Explore the PostgreSQL SQL Parser product page

This page documents the SQL syntax support for PostgreSQL in the General SQL Parser.

Syntax Coverage Corpus

GSP tests PostgreSQL syntax against 132 documented constructs grouped into 1 categories, each cross-referenced to the documentation that defines it (131 distinct source pages).

Parse coverage

Measured against GSP Java 4.2.8 on 2026-08-31 (UTC) (artifact sha256 1117856ef134). Each construct below carries the complete set of examples from the PostgreSQL documentation; a construct counts as fully covered only when every one of its examples parses. Percentages are pass rates over this documented-example corpus — not a percentage of the entire SQL dialect.

Constructs fully parsed Individual statements parsed
All constructs 127 of 132 (96%) 467 of 481 (97%)
SELECT (queries) 15 of 16 (94%) 45 of 46 (98%)
DML (INSERT / UPDATE / DELETE / MERGE) 11 of 11 (100%) 45 of 45 (100%)
Stored procedures 5 of 6 (83%) 14 of 16 (88%)

Statements are split using the parser's own statement splitter, so multi-statement examples and procedure bodies are counted correctly. The SELECT, DML and stored-procedure rows classify each statement by its parsed statement type: a construct is counted in a row when its examples contain at least one statement of that class, and is fully parsed when all of them parse. Stored procedures covers CREATE PROCEDURE / FUNCTION / PACKAGE / TRIGGER definitions and anonymous blocks.

Machine-readable: dialect data (JSON) · all-dialect matrix · coverage matrix overview

All 132 constructs

Construct Category Parses Specified in
ABORT all 1 PostgreSQL docs
ALTER AGGREGATE all 4 PostgreSQL docs
ALTER COLLATION all 2 PostgreSQL docs
ALTER CONVERSION all 2 PostgreSQL docs
ALTER DATABASE all 1 PostgreSQL docs
ALTER DEFAULT PRIVILEGES all 6 PostgreSQL docs
ALTER DOMAIN all 6 PostgreSQL docs
ALTER EXTENSION all 3 PostgreSQL docs
ALTER FOREIGN DATA WRAPPER all 2 PostgreSQL docs
ALTER FOREIGN TABLE all 2 PostgreSQL docs
ALTER FUNCTION all 5 PostgreSQL docs
ALTER GROUP all 2 PostgreSQL docs
ALTER INDEX all 4 PostgreSQL docs
ALTER MATERIALIZED VIEW all 1 PostgreSQL docs
ALTER OPERATOR all 1 PostgreSQL docs
ALTER OPERATOR FAMILY all 2 PostgreSQL docs
ALTER ROLE all 7 PostgreSQL docs
ALTER RULE all 1 PostgreSQL docs
ALTER SEQUENCE all 1 PostgreSQL docs
ALTER SERVER all 2 PostgreSQL docs
ALTER SYSTEM all 2 PostgreSQL docs
ALTER TABLE all 23 PostgreSQL docs
ALTER TABLESPACE all 2 PostgreSQL docs
ALTER TEXT SEARCH CONFIGURATION all 1 PostgreSQL docs
ALTER TEXT SEARCH DICTIONARY all 3 PostgreSQL docs
ALTER TRIGGER all 1 PostgreSQL docs
ALTER TYPE all 5 PostgreSQL docs
ALTER USER MAPPING all 1 PostgreSQL docs
ALTER VIEW all 6 PostgreSQL docs
BEGIN all 1 PostgreSQL docs
CLOSE all 1 PostgreSQL docs
CLUSTER all 3 PostgreSQL docs
COMMENT 28 of 36 PostgreSQL docs
COMMIT all 1 PostgreSQL docs
COMMIT PREPARED all 1 PostgreSQL docs
COPY all 4 PostgreSQL docs
CREATE AGGREGATE 1 of 2 PostgreSQL docs
CREATE CAST all 5 PostgreSQL docs
CREATE COLLATION all 2 PostgreSQL docs
CREATE CONVERSION all 1 PostgreSQL docs
CREATE DATABASE all 3 PostgreSQL docs
CREATE DOMAIN all 2 PostgreSQL docs
CREATE EVENT TRIGGER all 2 PostgreSQL docs
CREATE EXTENSION 1 of 2 PostgreSQL docs
CREATE FOREIGN DATA WRAPPER all 3 PostgreSQL docs
CREATE FOREIGN TABLE all 1 PostgreSQL docs
CREATE FUNCTION all 8 PostgreSQL docs
CREATE INDEX all 10 PostgreSQL docs
CREATE LANGUAGE all 3 PostgreSQL docs
CREATE OPERATOR all 1 PostgreSQL docs
CREATE OPERATOR CLASS all 1 PostgreSQL docs
CREATE ROLE all 4 PostgreSQL docs
CREATE RULE all 5 PostgreSQL docs
CREATE SCHEMA all 7 PostgreSQL docs
CREATE SEQUENCE all 8 PostgreSQL docs
CREATE SERVER all 1 PostgreSQL docs
CREATE TABLE all 18 PostgreSQL docs
CREATE TABLE AS all 2 PostgreSQL docs
CREATE TABLE AS all 2 PostgreSQL docs
CREATE TABLESPACE all 2 PostgreSQL docs
CREATE TEXT SEARCH DICTIONARY all 1 PostgreSQL docs
CREATE TRIGGER all 5 PostgreSQL docs
CREATE TYPE 10 of 13 PostgreSQL docs
CREATE USER MAPPING all 1 PostgreSQL docs
CREATE VIEW all 7 PostgreSQL docs
DECLARE all 1 PostgreSQL docs
DELETE all 6 PostgreSQL docs
DISCARD all 9 PostgreSQL docs
DO all 1 PostgreSQL docs
DROP AGGREGATE all 2 PostgreSQL docs
DROP CAST all 1 PostgreSQL docs
DROP COLLATION all 1 PostgreSQL docs
DROP CONVERSION all 1 PostgreSQL docs
DROP DOMAIN all 1 PostgreSQL docs
DROP EVENT TRIGGER all 1 PostgreSQL docs
DROP EXTENSION all 1 PostgreSQL docs
DROP FOREIGN DATA WRAPPER all 1 PostgreSQL docs
DROP FOREIGN TABLE all 1 PostgreSQL docs
DROP FUNCTION all 1 PostgreSQL docs
DROP INDEX all 1 PostgreSQL docs
DROP LANGUAGE all 1 PostgreSQL docs
DROP MATERIALIZED VIEW all 1 PostgreSQL docs
DROP OPERATOR all 3 PostgreSQL docs
DROP OPERATOR CLASS all 1 PostgreSQL docs
DROP OPERATOR FAMILY all 1 PostgreSQL docs
DROP ROLE all 1 PostgreSQL docs
DROP RULE all 1 PostgreSQL docs
DROP SCHEMA all 1 PostgreSQL docs
DROP SEQUENCE all 1 PostgreSQL docs
DROP SERVER all 1 PostgreSQL docs
DROP TABLE all 1 PostgreSQL docs
DROP TABLESPACE all 1 PostgreSQL docs
DROP TEXT SEARCH CONFIGURATION all 1 PostgreSQL docs
DROP TEXT SEARCH DICTIONARY all 1 PostgreSQL docs
DROP TEXT SEARCH PARSER all 1 PostgreSQL docs
DROP TEXT SEARCH TEMPLATE all 1 PostgreSQL docs
DROP TRIGGER all 1 PostgreSQL docs
DROP TYPE all 1 PostgreSQL docs
DROP USER MAPPING all 1 PostgreSQL docs
DROP VIEW all 1 PostgreSQL docs
END all 1 PostgreSQL docs
EXPLAIN all 8 PostgreSQL docs
FETCH all 6 PostgreSQL docs
GRANT all 6 PostgreSQL docs
INSERT all 11 PostgreSQL docs
LISTEN all 2 PostgreSQL docs
LOCK all 10 PostgreSQL docs
MOVE 5 of 6 PostgreSQL docs
NOTIFY all 5 PostgreSQL docs
PREPARE all 4 PostgreSQL docs
PREPARE TRANSACTION all 1 PostgreSQL docs
REFRESH MATERIALIZED VIEW all 2 PostgreSQL docs
REINDEX all 2 PostgreSQL docs
RELEASE SAVEPOINT all 6 PostgreSQL docs
REVOKE all 3 PostgreSQL docs
ROLLBACK all 1 PostgreSQL docs
ROLLBACK PREPARED all 1 PostgreSQL docs
ROLLBACK TO SAVEPOINT all 8 PostgreSQL docs
SAVEPOINT all 13 PostgreSQL docs
SECURITY LABEL all 1 PostgreSQL docs
SELECT all 20 PostgreSQL docs
SELECT INTO all 1 PostgreSQL docs
SET all 2 PostgreSQL docs
SET ROLE all 3 PostgreSQL docs
SET SESSION AUTHORIZATION all 3 PostgreSQL docs
SET TRANSACTION all 4 PostgreSQL docs
SHOW all 3 PostgreSQL docs
TRUNCATE all 3 PostgreSQL docs
UNLISTEN all 4 PostgreSQL docs
UPDATE all 14 PostgreSQL docs
VACUUM all 1 PostgreSQL docs
VALUES all 7 PostgreSQL docs

Key Features Supported

  • Standard SQL operations (SELECT, INSERT, UPDATE, DELETE)
  • PostgreSQL-specific data types (JSON, JSONB, Arrays, etc.)
  • Advanced window functions and CTEs
  • Stored procedures and functions (PL/pgSQL)
  • Full-text search capabilities
  • Partitioning and inheritance features