Re: [HACKERS] Accurate list of Keywords / Datatypes?

2016-05-10 Thread Robins Tharakan
On 8 May 2016 at 07:38, Euler Taveira  wrote:

> src/include/parser/kwlist.h


​Thanks Everyone.

Kwlist.h got me going as to where to look, but I had to improvise (quite) a
bit. Any and all advice about any other authoritative lists (like kwlist.h)
would be a big help, since currently much is kludgy.

Created a GitHub Repo in case someone's interested (
https://github.com/robins/npp-lang-plpgsql).

​For PLPGSQL, (src/pl/plpgsql/src/pl_scanner.c)​

For DataTypes, (src/interfaces/ecpg/preproc/c_keywords.c
; src/backend/bootstrap/bootstrap.c) as well as parse all HTML pages under
http://www.postgresql.org/docs/devel/static/datatype.html.

For Config Parameters (recovery.sample.conf ; postgresql.sample.conf) as
well as parse all HTML pages under
http://www.postgresql.org/docs/devel/static/runtime-config.html ;
http://www.postgresql.org/docs/devel/static/libpq-connect.html

For Extensions (Parse HTML:
http://www.postgresql.org/docs/devel/static/contrib.html)

-
robins


Re: [HACKERS] Accurate list of Keywords / Datatypes?

2016-05-10 Thread Euler Taveira
On 10-05-2016 22:22, David G. Johnston wrote:
> I don't know how the docs, this function, and the source code relate to
> each other.
> 
Function is built around ScanKeywords structure which in turn is built
using parser/kwlist.h.


-- 
   Euler Taveira   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Accurate list of Keywords / Datatypes?

2016-05-10 Thread Michael Paquier
On Wed, May 11, 2016 at 10:22 AM, David G. Johnston
 wrote:
> On Saturday, May 7, 2016, Euler Taveira  wrote:
>>
>> On 07-05-2016 22:53, Robins Tharakan wrote:
>> > Should I be looking somewhere else? Parse keywords from Git Source file
>> > (if so where)? Parse PG Documentation?
>> >
>> src/include/parser/kwlist.h
>>
>>
>
>  http://www.postgresql.org/docs/9.5/interactive/functions-info.html
>
> SELECT * FROM pg_get_keywords();
>
> I don't know how the docs, this function, and the source code relate to each
> other.

ScanKeywords is fed directly from kwlist.h, have for example a look at
the top of src/common/keywords.c. Then NumScanKeywords is calculated
from the list generated. pg_get_keywords is at the end making use of
those structures generated.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


Re: [HACKERS] Accurate list of Keywords / Datatypes?

2016-05-10 Thread David G. Johnston
On Saturday, May 7, 2016, Euler Taveira  wrote:

> On 07-05-2016 22:53, Robins Tharakan wrote:
> > Should I be looking somewhere else? Parse keywords from Git Source file
> > (if so where)? Parse PG Documentation?
> >
> src/include/parser/kwlist.h


>
 http://www.postgresql.org/docs/9.5/interactive/functions-info.html

SELECT * FROM pg_get_keywords();

I don't know how the docs, this function, and the source code relate to
each other.

David J.


Re: [HACKERS] Accurate list of Keywords / Datatypes?

2016-05-07 Thread Euler Taveira
On 07-05-2016 22:53, Robins Tharakan wrote:
> Should I be looking somewhere else? Parse keywords from Git Source file
> (if so where)? Parse PG Documentation?
> 
src/include/parser/kwlist.h


-- 
   Euler Taveira   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers