Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9405e14

Browse files
committed
Switch order of WHERE clauses in tab completion queries, as suggested
by Rod Taylor. The foo_is_visible() functions are relatively slow andso it pays to check them after checking the name pattern match.
1 parent0add759 commit9405e14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/bin/psql/tab-complete.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.118 2004/11/05 19:16:22 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.119 2004/12/24 15:42:05 tgl Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -1807,11 +1807,11 @@ _complete_from_query(int is_schema_query, const char *text, int state)
18071807
if (completion_squery->selcondition)
18081808
appendPQExpBuffer(&query_buffer,"%s AND ",
18091809
completion_squery->selcondition);
1810-
appendPQExpBuffer(&query_buffer,"%s AND ",
1811-
completion_squery->viscondition);
18121810
appendPQExpBuffer(&query_buffer,"substring(%s,1,%d)='%s'",
18131811
completion_squery->result,
18141812
string_length,e_text);
1813+
appendPQExpBuffer(&query_buffer," AND %s",
1814+
completion_squery->viscondition);
18151815

18161816
/*
18171817
* When fetching relation names, suppress system catalogs

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp