From: | Dave Page <dpage(at)pgadmin(dot)org> |
---|---|
To: | Vladimir Kokovic <vladimir(dot)kokovic(at)gmail(dot)com> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_scanner - patch no.1 |
Date: | 2012-11-08 16:39:45 |
Message-ID: | CA+OCxozoXu9XTjqXO_JpY7PLp=K1u28HVR-md+z5zZZ=VoyPjA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi
On Sun, Oct 21, 2012 at 9:08 AM, Vladimir Kokovic
<vladimir(dot)kokovic(at)gmail(dot)com> wrote:
> Hi,
>
> This patch is my try to add lexical scanner for PostgreSQL SQL
> commands in Pgadmin source tree(prerequisite for patches no.2 and 3).
>
> The main reason why that is done is to scan and parse a SQL command in
> the same way
> like PostgreSQL server, but for limited number of parse functions.
>
> All scanner special cases are covered: TYPECAST(::), COLON_EQUALS(:=),
> DOT_DOT(..) and $foo$.
OK, so I finally got a chance to look at this. Unfortunately, it
doesn't compile here :-(
ccache gcc -c -DSCANNER_VERSION=92 -DPGADMIN_SCANNER
-I./../../xtra/pg_scanners \
-I./../../pgadmin/include/utils \
-I./../../xtra/pg_scanners/src/backend/parser/92
-I./../../xtra/pg_scanners/src/include \
-Wall -I`/usr/local/pgsql/bin/pg_config --includedir`
-I`/usr/local/pgsql/bin/pg_config --includedir-server` -o scansup.o
../../xtra/pg_scanners/scansup.c
ccache gcc -c -DSCANNER_VERSION=92 -DPGADMIN_SCANNER
-I./../../xtra/pg_scanners \
-I./../../pgadmin/include/utils \
-I./../../xtra/pg_scanners/src/backend/parser/92
-I./../../xtra/pg_scanners/src/include \
-Wall -I`/usr/local/pgsql/bin/pg_config --includedir`
-I`/usr/local/pgsql/bin/pg_config --includedir-server` -DXVER=0x92 -o
PgadminScannerCommon.o ../../xtra/pg_scanners/PgadminScannerCommon.c
ccache gcc -c -DSCANNER_VERSION=92 -DPGADMIN_SCANNER
-I./../../xtra/pg_scanners \
-I./../../pgadmin/include/utils \
-I./../../xtra/pg_scanners/src/backend/parser/92
-I./../../xtra/pg_scanners/src/include \
-Wall -I`/usr/local/pgsql/bin/pg_config --includedir`
-I`/usr/local/pgsql/bin/pg_config --includedir-server` -DXVER=0x92 -o
PgadminScanner92.o ../../xtra/pg_scanners/PgadminScanner.c
In file included from ../../xtra/pg_scanners/scansup.c:21:
./../../pgadmin/include/utils/PgadminScanner.h:1088: error:
conflicting types for ‘ExceptionalCondition’
/usr/local/pgsql/include/server/postgres.h:688: error: previous
declaration of ‘ExceptionalCondition’ was here
make[3]: *** [scansup.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from ../../xtra/pg_scanners/PgadminScannerCommon.c:4:
./../../pgadmin/include/utils/PgadminScanner.h:1088: error:
conflicting types for ‘ExceptionalCondition’
/usr/local/pgsql/include/server/postgres.h:688: error: previous
declaration of ‘ExceptionalCondition’ was here
../../xtra/pg_scanners/PgadminScannerCommon.c:155: error: conflicting
types for ‘ExceptionalCondition’
/usr/local/pgsql/include/server/postgres.h:688: error: previous
declaration of ‘ExceptionalCondition’ was here
make[3]: *** [PgadminScannerCommon.o] Error 1
In file included from ../../xtra/pg_scanners/PgadminScanner.c:4:
./../../pgadmin/include/utils/PgadminScanner.h:1088: error:
conflicting types for ‘ExceptionalCondition’
/usr/local/pgsql/include/server/postgres.h:688: error: previous
declaration of ‘ExceptionalCondition’ was here
make[3]: *** [PgadminScanner92.o] Error 1
make[2]: *** [../xtra/pg_scanners/libpgscanner92.a] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
That's on Mac OS X 10.8.2 with i686-apple-darwin11-llvm-gcc-4.2 (GCC)
4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00),
building against PG 9.1.
Can you look into that please?
(one minor nit-pick about the patch, please don't capitalise the first
letter of pgAdmin, e.g. use pgadminScannerCommon.c not
PgadminScannerCommon.c)
Thanks.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Kokovic | 2012-11-09 05:23:04 | Re: pg_scanner - patch no.1 |
Previous Message | Dave Page | 2012-11-08 15:38:40 | Re: [Patch] Crash in pgAdmin when Refresh object on click is enabled |