Обсуждение: Postgres SQL Parser

Поиск
Список
Период
Сортировка

Postgres SQL Parser

От
Uma Krishnan
Дата:
Hello I'm trying to implement a new SortMerge algorithm, and see how it compares with the current algorithm. In doing so, rather than using select, I'd like to introduce a new verb so that Select is not modified.
 
I looked at the source code, but could find the place where Postgres SQL grammer is defined.
 
Please help.
 
Thanks

Re: Postgres SQL Parser

От
Bruce Momjian
Дата:
Uma Krishnan wrote:
> Hello I'm trying to implement a new SortMerge algorithm, and see how
> it compares with the current algorithm. In doing so, rather than using
> select, I'd like to introduce a new verb so that Select is not modified.
> 
>   I looked at the source code, but could find the place where Postgres
>   SQL grammer is defined.
src/parser/gram.y

I recommend you read the developer's FAQ.


-- Bruce Momjian  <bruce@momjian.us>          http://momjian.us EnterpriseDB
http://www.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: Postgres SQL Parser

От
"Andrew Dunstan"
Дата:
Uma Krishnan wrote:
> Hello I'm trying to implement a new SortMerge algorithm, and see how it
> compares with the current algorithm. In doing so, rather than using
> select, I'd like to introduce a new verb so that Select is not modified.
>
>   I looked at the source code, but could find the place where Postgres SQL
> grammer is defined.
>

src/backend/parser/gram.y

If you intend this work to be incorporated into PostgreSQL you should
discuss it first on this list, before you cut a single line of code - the
bar for new verbs is likely to be set fairly high.

cheers

andrew