Parser extensions (maybe for 10?) - Mailing list pgsql-hackers

From Arcadiy Ivanov
Subject Parser extensions (maybe for 10?)
Date
Msg-id 570C7B5A.9070309@gmail.com
Whole thread Raw
Responses Re: Parser extensions (maybe for 10?)  (Craig Ringer <craig@2ndquadrant.com>)
Re: Parser extensions (maybe for 10?)  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
Re: Parser extensions (maybe for 10?)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Parser extensions (maybe for 10?)  (Stas Kelvich <s.kelvich@postgrespro.ru>)
List pgsql-hackers
<font face="Verdana">I thought I'd float this idea and see if this gets any traction. Please forgive my ignorance if
thishas been discussed already.<br /><br /> Currently the parser and lexer are fully fixed at compile-time and not
amenableto the extensions - extensions are only capable of introducing functions etc. <br /><br /> There is, however,
anadvantage to being able if not add or alter complete statements (which would be nice), but to at least augment
portionsof syntax for existing ones in some places. <br /><br /> For example PGXL adds the following to CREATE TABLE
statement:<br/><br /> [ <br />   DISTRIBUTE BY { REPLICATION | ROUNDROBIN | { [HASH | MODULO ] ( column_name ) } } |<br
/>  DISTRIBUTED { { BY ( column_name ) } | { RANDOMLY } |<br />   DISTSTYLE { EVEN | KEY | ALL } DISTKEY ( column_name
)<br/> ]<br /> [ TO { GROUP groupname | NODE ( nodename [, ... ] ) } ]<br /><br /> Compare:<br /><br /><a
class="moz-txt-link-freetext"
href="http://www.postgresql.org/docs/9.5/static/sql-createtable.html">http://www.postgresql.org/docs/9.5/static/sql-createtable.html</a><br
/><aclass="moz-txt-link-freetext"
href="http://files.postgres-xl.org/documentation/sql-createtable.html">http://files.postgres-xl.org/documentation/sql-createtable.html</a><br
/><br/> Is there any interest and/or tips to allow a pluggable parser or at least allow some syntactical pluggability
byextensions? <br /> I think this may allow some projects to move towards becoming an extension as opposed to forking
theproject entirely.<br /><br /> Cheers,<br /></font> <pre class="moz-signature" cols="72">--  
Arcadiy Ivanov
<a class="moz-txt-link-abbreviated" href="mailto:arcadiy@gmail.com">arcadiy@gmail.com</a> | @arcivanov | <a
class="moz-txt-link-freetext"href="https://ivanov.biz">https://ivanov.biz</a> 
<a class="moz-txt-link-freetext" href="https://github.com/arcivanov">https://github.com/arcivanov</a>
</pre>

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Allow Pin/UnpinBuffer to operate in a lockfree manner.
Next
From: Craig Ringer
Date:
Subject: Re: Parser extensions (maybe for 10?)