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

Commit722408b

Browse files
committed
Add infrastructure to support server-version-dependent tab completion.
Up to now we've not worried about whether psql's tab completion querieswould work against prior server versions. But since we support olderserver versions in describe.c, we really ought to do so here as well.Failing to take care of this not only leads to loss of tab-completionservice when using an older server, but risks aborting a user's opentransaction when we send an incompatible query to the server.The recent changes in pg_proc.prokind are one reason to take this moreseriously now than before, and the proposed patch for completion afterSELECT needs some such capability as well.Hence, create some infrastructure to allow selection of one of severalversions of a query depending on server version. For cases where wejust need to select one of several query strings, introduce VersionedQueryand COMPLETE_WITH_VERSIONED_QUERY(). Likewise extend the SchemaQueryinfrastructure to allow versioning of those.I went ahead and fixed the prokind issues, to serve as an illustrationof how to use versioned SchemaQuery. To have some illustration ofVersionedQuery, change the support for completion of publication andsubscription names so that psql will not send sure-to-fail queries topre-v10 servers. There is much more that should be done to make tabcompletion more friendly to older servers, but this commit is mainlymeant to get the infrastructure in place, so I stopped here.Discussion:https://postgr.es/m/24314.1520190408@sss.pgh.pa.us
1 parent42d7074 commit722408b

File tree

1 file changed

+330
-128
lines changed

1 file changed

+330
-128
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp