Good catch. Patch attached and applied.
Strange I didn't see that warning here, gcc 2.95.2.
---------------------------------------------------------------------------
Joe Conway wrote:
> I'm seeing:
>
> gcc -O2 -g -Wall -Wmissing-prototypes -Wmissing-declarations
> -I../../../src/interfaces/libpq -I../../../src/include -c -o
> tab-complete.o tab-complete.c -MMD
> tab-complete.c:414: warning: initialization makes integer from pointer
> without a cast
> tab-complete.c:422: warning: initialization makes integer from pointer
> without a cast
> tab-complete.c:428: warning: initialization makes integer from pointer
> without a cast
> tab-complete.c:431: warning: initialization makes integer from pointer
> without a cast
> tab-complete.c:434: warning: initialization makes integer from pointer
> without a cast
>
> Looks to me like the second attribute should be NO_SCHEMA instead of
> NULL in those lines.
>
> Joe
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Index: src/bin/psql/tab-complete.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/tab-complete.c,v
retrieving revision 1.74
diff -c -c -r1.74 tab-complete.c
*** src/bin/psql/tab-complete.c 27 Mar 2003 16:45:01 -0000 1.74
--- src/bin/psql/tab-complete.c 28 Mar 2003 16:33:42 -0000
***************
*** 411,417 ****
pgsql_thing_t words_after_create[] = {
{"AGGREGATE", WITH_SCHEMA, Query_for_list_of_aggregates},
! {"CAST", NULL, NULL}, /* Casts have complex structures for namees, so skip it */
{"CONVERSION", NO_SCHEMA, "SELECT conname FROM pg_catalog.pg_conversion WHERE substr(conname,1,%d)='%s'"},
{"DATABASE", NO_SCHEMA, Query_for_list_of_databases},
{"DOMAIN", WITH_SCHEMA, Query_for_list_of_domains},
--- 411,417 ----
pgsql_thing_t words_after_create[] = {
{"AGGREGATE", WITH_SCHEMA, Query_for_list_of_aggregates},
! {"CAST", NO_SCHEMA, NULL}, /* Casts have complex structures for namees, so skip it */
{"CONVERSION", NO_SCHEMA, "SELECT conname FROM pg_catalog.pg_conversion WHERE substr(conname,1,%d)='%s'"},
{"DATABASE", NO_SCHEMA, Query_for_list_of_databases},
{"DOMAIN", WITH_SCHEMA, Query_for_list_of_domains},
***************
*** 419,437 ****
{"GROUP", NO_SCHEMA, "SELECT groname FROM pg_catalog.pg_group WHERE substr(groname,1,%d)='%s'"},
{"LANGUAGE", NO_SCHEMA, Query_for_list_of_languages},
{"INDEX", WITH_SCHEMA, Query_for_list_of_indexes},
! {"OPERATOR", NULL, NULL}, /* Querying for this is probably not such
* a good idea. */
{"RULE", NO_SCHEMA, "SELECT rulename FROM pg_catalog.pg_rules WHERE substr(rulename,1,%d)='%s'"},
{"SCHEMA", NO_SCHEMA, Query_for_list_of_schemas},
{"SEQUENCE", WITH_SCHEMA, Query_for_list_of_sequences},
{"TABLE", WITH_SCHEMA, Query_for_list_of_tables},
! {"TEMP", NULL, NULL}, /* for CREATE TEMP TABLE ... */
{"TRIGGER", NO_SCHEMA, "SELECT tgname FROM pg_catalog.pg_trigger WHERE substr(tgname,1,%d)='%s'"},
{"TYPE", WITH_SCHEMA, Query_for_list_of_datatypes },
! {"UNIQUE", NULL, NULL}, /* for CREATE UNIQUE INDEX ... */
{"USER", NO_SCHEMA, Query_for_list_of_users},
{"VIEW", WITH_SCHEMA, Query_for_list_of_views},
! {NULL, NULL} /* end of list */
};
--- 419,437 ----
{"GROUP", NO_SCHEMA, "SELECT groname FROM pg_catalog.pg_group WHERE substr(groname,1,%d)='%s'"},
{"LANGUAGE", NO_SCHEMA, Query_for_list_of_languages},
{"INDEX", WITH_SCHEMA, Query_for_list_of_indexes},
! {"OPERATOR", NO_SCHEMA, NULL}, /* Querying for this is probably not such
* a good idea. */
{"RULE", NO_SCHEMA, "SELECT rulename FROM pg_catalog.pg_rules WHERE substr(rulename,1,%d)='%s'"},
{"SCHEMA", NO_SCHEMA, Query_for_list_of_schemas},
{"SEQUENCE", WITH_SCHEMA, Query_for_list_of_sequences},
{"TABLE", WITH_SCHEMA, Query_for_list_of_tables},
! {"TEMP", NO_SCHEMA, NULL}, /* for CREATE TEMP TABLE ... */
{"TRIGGER", NO_SCHEMA, "SELECT tgname FROM pg_catalog.pg_trigger WHERE substr(tgname,1,%d)='%s'"},
{"TYPE", WITH_SCHEMA, Query_for_list_of_datatypes },
! {"UNIQUE", NO_SCHEMA, NULL}, /* for CREATE UNIQUE INDEX ... */
{"USER", NO_SCHEMA, Query_for_list_of_users},
{"VIEW", WITH_SCHEMA, Query_for_list_of_views},
! {NULL, NO_SCHEMA, NULL} /* end of list */
};