PostgreSQL SQL Parser

The built-in PostgreSQL SQL engine in General SQL Parser provides in-depth analysis of an organization's PostgreSQL SQL script(support SELECT/INSERT/DELETE/UPDATE/CREATE TABLE/CREATE VIEW in Java version only) at a detailed level that would not be possible without a complete, 100% compatible query parser.

Parsing SQL is a notoriously difficult task because the SQL syntax of PostgreSQL is very ambiguous in a lot of places. Many people have attempted to write a full SQL grammar with parser generate tool and failed.

Now you can fully incorporated this PostgreSQL SQL parser into your products, instantly adding a powerful SQL processing capability to your program. With the right library, you can get your job done quickly by saving hundred of hours, if not more, on developing time.

Clean up messy SQL codes

Easily integrate SQL formatter into your application for a color coded layout that is easy to navigate, giving your product a professional feeling.

Detect SQL syntax errors

Your application will be able to validate SQL syntax before a database executes the query. This is very useful especially if your SQL was dynamically built based on user input.

Rid SQL injections

Avoid being vulnerable to SQL injection in your ASP.NET or Java application, by automatically detecting malicious SQL segment with our ready-to-use library.

Retrieve/Refactor table & column name

Precisely determining and renaming every table and column in stored SQL statements is very complex with a lot of nesting and sub-queries. With us, however, that tedious procedure can become hassle-free one for you.

Find affected SQL objects

Parse out the affect SQL objects in a SQL file that can have many different types of SQL (select, insert, create, drop, etc), and helping to determine what is being affected, including but not limited to schema, table, column.

Discover the relationship in DDL

Quickly locate the primary key and/or foreign key in DDL scripts to figure out the complex relationship among the various tables. Extracted table, attribute names, data types can be used to generate the CRUD-Statements.

Query parse tree in XML

Parsing SQL is a notoriously difficult task, but we are here to help. You will be provided with a SQL query parse tree in XML output that will allow you to further process SQL scripts.

Rewrite and convert SQL

Modify SQL expression/condition in where clause to reconstruct a new filter. Rewrite Oracle proprietary joins to ANSI SQL compliant joins. Translate SQL between different databases.

CRUD Reportor

Read complex and large SQL scripts to find out tables have Create, Read, Update, Delete and Insert operations against them immediately, it's almost impossible to do that without help with a tool.

SQL Parser can even do more

We are dedicated to constantly improving our product so it will be easier to use with more flexibility, making it a valuable asset to your software product. Here, we have provided you with additional demos that may be helpful to you.

 

Supported SQL

Level 1: SQL parser recognizes that this is a valid SQL statement, but can't validate the syntax of this specific SQL statement. This demo shows how General SQL Parser can handle this kind of SQL statements.

Level 2: SQL Parser fully parses this kind of SQL statements with detailed query parse tree node elements and provides everything you need to analyze and manipulate this kind of SQL statements.

SQL statements Level 1 Level 2
abort Y
Alter Aggregate Y
Alter Collation Y
Alter Conversion Y
Alter database Y
Alter Default Privileges Y
Alter Domain Y
Alter Extension Y
Alter Foreign Data Wrapper Y
Alter Foreign Table Y
Alter Function Y
Alter Group Y
Alter Index Y
Alter Language Y
Alter Large Object Y
Alter Operator Y
Alter Operator Class Y
Alter Operator Family Y
Alter Language Y
Alter Role Y
Alter Schema Y
Alter Sequence Y
Alter Server Y
alter table Y
alter tablespace Y
alter Text Search Configuration Y
alter Text Search Dictionary Y
alter Text Search Parser Y
alter Text Search Template Y
alter Trigger Y
alter Type Y
alter User Y
alter User Mapping Y
alter view Y
analyze Y
Checkpoint Y
close Y
Cluster Y
Comment Y
commit Y
commit Prepared Y
Copy Y
Create Aggregate Y
Create Cast Y
Create Collation Y
Create Collation Y
Conversion Y
create database Y
create domain Y
create Extension Y
create Foreign Data Wrapper Y
create Foreign Table Y
create function Y
Create Group Y
create index Y Y
Create Language Y
Create Operator Y
Create Operator Class Y
Create Operator Fimaly Y
Create Role Y
Create Rule Y
Create Schema Y
Create Sequence Y
Create Server Y
Create Table Y
create tablespace Y
create Sequence Y
create Text Search Configuration Y
create Text Search Dictionary Y
create Text Search Parser Y
create Text Search Template Y
create trigger Y
create Type Y
create user Y
create user mapping Y
create view Y Y
Deallocate Y
declare Y
delete Y Y
Discard Y
Do Y
Drop Aggregate Y
Drop Cast Y
Drop Collation Y
Drop Conversion Y
drop database Y
drop domain Y
drop Extension Y
drop Foreign Data Wrapper Y
drop Foreign Table Y
drop Function Y
drop Group Y
drop index Y
drop Language Y
drop Operator Y
drop Operator Class Y
drop Operator Family Y
drop Owned Y
drop Role Y
drop Rule Y
drop Schema Y
drop Sequence Y
drop Server Y
drop Server Y
drop table Y
drop tablespace Y
drop Text Search Configuration Y
drop Text Search Dictionary Y
drop Text Search Parser Y
drop Text Search Template Y
drop trigger Y
drop type Y
drop user Y
drop user mapping Y
drop view Y
execute Y
explain
fetch Y
grant Y
insert Y Y
Listen Y
load data infile Y
lock Y
move Y
notify Y
Prepare Y
Prepare Transaction Y
Reassign Owned Y
Reindex Y
Release Savepoint Y
Reset Y
Revoke Y
rollback Y
rollback Prepared Y
savepoint Y
Security Label Y
select Y Y
set Y
set Constraints Y
set Session Authorization Y
set Role Y
set transaction Y
truncate Y
Unlisten
update Y Y
Values Y

 

Any other benefits can I get by using this SQL Parser?

Yes, of course. We collect all kinds of examples in this page to illustrate how and why you want to use general sql parser, hope it can help you to make better use of this library.

 

Questions?

If you have any questions about General SQL Parser, You can always send us an email and we'll get back to you within 24 hours.