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

Commit9898c5e

Browse files
committed
Improve correlation names in sanity tests
Some of the queries in the "sanity" tests in the regression test suite(opr_sanity, type_sanity) are very confusing. One main stumblingblock is that for some probably ancient reason many of the olderqueries are written with correlation names p1, p2, etc. independent ofthe name of the catalog. This one is a good example:SELECT p1.oid, p1.oprname, p2.oid, p2.pronameFROM pg_operator AS p1, pg_proc AS p2 <-- HEREWHERE p1.oprcode = p2.oid AND p1.oprkind = 'l' AND (p2.pronargs != 1 OR NOT binary_coercible(p2.prorettype, p1.oprresult) OR NOT binary_coercible(p1.oprright, p2.proargtypes[0]) OR p1.oprleft != 0);This is better written asSELECT o1.oid, o1.oprname, p1.oid, p1.pronameFROM pg_operator AS o1, pg_proc AS p1WHERE o1.oprcode = p1.oid AND o1.oprkind = 'l' AND (p1.pronargs != 1 OR NOT binary_coercible(p1.prorettype, o1.oprresult) OR NOT binary_coercible(o1.oprright, p1.proargtypes[0]) OR o1.oprleft != 0);This patch cleans up all the queries in this manner.(As in the above case, I kept the digits like o1 and p1 even in caseswhere only one of each letter is used in a query. This is mainly tokeep the style consistent.)Discussion:https://www.postgresql.org/message-id/flat/c538308b-319c-8784-e250-1284d12d5411%40enterprisedb.com
1 parentcba5b99 commit9898c5e

File tree

4 files changed

+841
-841
lines changed

4 files changed

+841
-841
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp