Re: [PATCH] Improve autocompletion for SELECT statements

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Kris Shannon <kris(at)shannon(dot)id(dot)au>
Cc: Wander Winkelhorst <w(dot)winkelhorst+pgadmin(at)gmail(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, "pgadmin-hackers(at)postgresql(dot)org" <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Improve autocompletion for SELECT statements
Date: 2011-12-05 12:22:21
Message-ID: CA+OCxoxy=CuHo5cBvUzgqaRD47RrKZAk7sS_+u=9+3FwrVaWqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Wed, Nov 16, 2011 at 2:47 AM, Kris Shannon <kris(at)shannon(dot)id(dot)au> wrote:
> On 15 November 2011 20:31, Wander Winkelhorst
> <w(dot)winkelhorst+pgadmin(at)gmail(dot)com> wrote:
>> Yeah, I've tried that, didn't work. tabcomplete.pl says "Failed match 1 at
>> tabcomplete.pl line 28."
>
> Here's a fix for tabcomplete.pl which lets it work for all versions of
> tab-complete.c from 8.0.0 to current HEAD

Hi,

I just got round to testing this. It fails to produce a usable output
file for me with tab-complete.c from 9.1.2. Did you check the
resulting file as well, or just that the script ran without error?

ccache gcc -DHAVE_CONFIG_H -I. -I..
-DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\"
-I../pgadmin/include -I/usr/local/pgsql/include
-I/usr/local/pgsql/include/server -I/usr/local/pgsql/include -DSSL
-DHAVE_CONNINFO_PARSE
-I/usr/local/lib/wx/include/mac-unicode-release-static-2.8
-I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D__WXMAC__ -DEMBED_XRC -arch i386 -I/usr/local/include/libxml2
-I/usr/local/include -I/usr/local/include/libxml2 -O2 -MT
tabcomplete.o -MD -MP -MF .deps/tabcomplete.Tpo -c -o tabcomplete.o
`test -f './utils/tabcomplete.c' || echo './'`./utils/tabcomplete.c
In file included from ./utils/tabcomplete.c:176:
./utils/tab-complete.inc:464: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or
‘__attribute__’ before ‘flags’
./utils/tab-complete.inc:481: warning: excess elements in struct initializer
./utils/tab-complete.inc:481: warning: (near initialization for
‘words_after_create[3]’)
./utils/tab-complete.inc:484: warning: excess elements in struct initializer
./utils/tab-complete.inc:484: warning: (near initialization for
‘words_after_create[6]’)
./utils/tab-complete.inc:495: warning: excess elements in struct initializer
./utils/tab-complete.inc:495: warning: (near initialization for
‘words_after_create[16]’)
./utils/tab-complete.inc:496: warning: excess elements in struct initializer
./utils/tab-complete.inc:496: warning: (near initialization for
‘words_after_create[17]’)
./utils/tab-complete.inc:504: warning: excess elements in struct initializer
./utils/tab-complete.inc:504: warning: (near initialization for
‘words_after_create[25]’)
./utils/tab-complete.inc:505: warning: excess elements in struct initializer
./utils/tab-complete.inc:505: warning: (near initialization for
‘words_after_create[26]’)
./utils/tab-complete.inc:509: warning: excess elements in struct initializer
./utils/tab-complete.inc:509: warning: (near initialization for
‘words_after_create[30]’)
./utils/tab-complete.inc:510: warning: excess elements in struct initializer
./utils/tab-complete.inc:510: warning: (near initialization for
‘words_after_create[31]’)
./utils/tab-complete.inc: In function ‘psql_completion’:
./utils/tab-complete.inc:596: warning: assignment makes pointer from
integer without a cast
./utils/tab-complete.inc:598: warning: assignment makes pointer from
integer without a cast
./utils/tab-complete.inc:600: warning: assignment makes pointer from
integer without a cast
./utils/tab-complete.inc:616: error: ‘drop_command_generator’
undeclared (first use in this function)
./utils/tab-complete.inc:616: error: (Each undeclared identifier is
reported only once
./utils/tab-complete.inc:616: error: for each function it appears in.)
./utils/tab-complete.inc:616: warning: assignment makes pointer from
integer without a cast
In file included from ./utils/tabcomplete.c:176:
./utils/tab-complete.inc:999:56: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:999: error: ‘COMPLETE_WITH_ATTR’ undeclared
(first use in this function)
./utils/tab-complete.inc:1009:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:1037:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:1285:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:1565:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:1570:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:2128:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:2216:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:2492:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:2582:34: error: macro "COMPLETE_WITH_ATTR"
passed 2 arguments, but takes just 1
./utils/tab-complete.inc:2688: warning: assignment makes pointer from
integer without a cast
make[3]: *** [tabcomplete.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-12-06 06:16:30 pgAdmin III commit: Avoid crashing when working with objects with % in
Previous Message philippe rimbault 2011-12-05 10:01:05 Re: Compilation on Debian SID