From: | Arcadiy Ivanov <arcadiy(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Parser extensions (maybe for 10?) |
Date: | 2016-04-12 04:36:42 |
Message-ID: | 570C7B5A.9070309@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I thought I'd float this idea and see if this gets any traction. Please
forgive my ignorance if this has been discussed already.
Currently the parser and lexer are fully fixed at compile-time and not
amenable to the extensions - extensions are only capable of introducing
functions etc.
There is, however, an advantage to being able if not add or alter
complete statements (which would be nice), but to at least augment
portions of syntax for existing ones in some places.
For example PGXL adds the following to CREATE TABLE statement:
[
DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] (
column_name ) } } |
DISTRIBUTED { { BY ( column_name ) } | { RANDOMLY } |
DISTSTYLE { EVEN | KEY | ALL } DISTKEY ( column_name )
]
[ TO { GROUP groupname | NODE ( nodename [, ... ] ) } ]
Compare:
http://www.postgresql.org/docs/9.5/static/sql-createtable.html
http://files.postgres-xl.org/documentation/sql-createtable.html
Is there any interest and/or tips to allow a pluggable parser or at
least allow some syntactical pluggability by extensions?
I think this may allow some projects to move towards becoming an
extension as opposed to forking the project entirely.
Cheers,
--
Arcadiy Ivanov
arcadiy(at)gmail(dot)com | @arcivanov | https://ivanov.biz
https://github.com/arcivanov
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2016-04-12 04:45:33 | Re: Parser extensions (maybe for 10?) |
Previous Message | Tom Lane | 2016-04-12 04:32:13 | Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner. |