- Notifications
You must be signed in to change notification settings - Fork28
Commit9ff6027
committed
Fix assorted inconsistencies in GiST opclass support function declarations.
The conventions specified by the GiST SGML documentation were widelyignored. For example, the strategy-number argument for "consistent" and"distance" functions is specified to be a smallint, but most of thebuilt-in support functions declared it as an integer, and for that matterthe core code passed it using Int32GetDatum not Int16GetDatum. None ofthat makes any real difference at runtime, but it's quite confusing fornewcomers to the code, and it makes it very hard to write an amvalidate()function that checks support function signatures. So let's try to instillsome consistency here.Another similar issue is that the "query" argument is not of a singlewell-defined type, but could have different types depending on the strategy(corresponding to search operators with different righthand-side argumenttypes). Some of the functions threw up their hands and declared the queryargument as being of "internal" type, which surely isn't right ("any" wouldhave been more appropriate); but the majority position seemed to be todeclare it as being of the indexed data type, corresponding to a searchoperator with both input types the same. So I've specified a conventionthat that's what to do always.Also, the result of the "union" support function actually must be of theindex's storage type, but the documentation suggested declaring it toreturn "internal", and some of the functions followed that. Standardizeon telling the truth, instead.Similarly, standardize on declaring the "same" function's inputs asbeing of the storage type, not "internal".Also, somebody had forgotten to add the "recheck" argument to boththe documentation of the "distance" support function and all of theirSQL declarations, even though the C code was happily using that argument.Clean that up too.Fix up some other omissions in the docs too, such as documenting thatunion's second input argument is vestigial.So far as the errors in core function declarations go, we can just fixpg_proc.h and bump catversion. Adjusting the erroneous declarations incontrib modules is more debatable: in principle any change in thosescripts should involve an extension version bump, which is a pain.However, since these changes are purely cosmetic and make no functionaldifference, I think we can get away without doing that.1 parent53c949c commit9ff6027
File tree
18 files changed
+266
-193
lines changed- contrib
- btree_gist
- cube
- hstore
- intarray
- ltree
- pg_trgm
- seg
- tsearch2
- doc/src/sgml
- ref
- src
- backend/access/gist
- include
- catalog
- utils
- test/regress
- expected
- sql
18 files changed
+266
-193
lines changedLines changed: 103 additions & 103 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
304 | 304 |
| |
305 | 305 |
| |
306 | 306 |
| |
307 |
| - | |
| 307 | + | |
308 | 308 |
| |
309 | 309 |
| |
310 | 310 |
| |
| |||
339 | 339 |
| |
340 | 340 |
| |
341 | 341 |
| |
342 |
| - | |
343 |
| - | |
| 342 | + | |
| 343 | + | |
344 | 344 |
| |
345 | 345 |
| |
346 | 346 |
| |
| |||
368 | 368 |
| |
369 | 369 |
| |
370 | 370 |
| |
371 |
| - | |
| 371 | + | |
372 | 372 |
| |
373 | 373 |
| |
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
378 |
| - | |
| 378 | + |
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
486 | 486 |
| |
487 | 487 |
| |
488 | 488 |
| |
489 |
| - | |
| 489 | + | |
490 | 490 |
| |
491 | 491 |
| |
492 | 492 |
| |
493 |
| - | |
| 493 | + | |
494 | 494 |
| |
495 | 495 |
| |
496 | 496 |
| |
497 | 497 |
| |
498 |
| - | |
| 498 | + | |
499 | 499 |
| |
500 | 500 |
| |
501 | 501 |
| |
| |||
510 | 510 |
| |
511 | 511 |
| |
512 | 512 |
| |
513 |
| - | |
| 513 | + | |
514 | 514 |
| |
515 | 515 |
| |
516 | 516 |
| |
517 | 517 |
| |
518 | 518 |
| |
519 |
| - | |
| 519 | + | |
520 | 520 |
| |
521 | 521 |
| |
522 | 522 |
| |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
358 | 358 |
| |
359 | 359 |
| |
360 | 360 |
| |
361 |
| - | |
| 361 | + | |
362 | 362 |
| |
363 | 363 |
| |
364 | 364 |
| |
| |||
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
408 |
| - | |
| 408 | + | |
409 | 409 |
| |
410 | 410 |
| |
411 | 411 |
| |
| |||
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
438 |
| - | |
| 438 | + | |
439 | 439 |
| |
440 | 440 |
| |
441 | 441 |
| |
| |||
461 | 461 |
| |
462 | 462 |
| |
463 | 463 |
| |
464 |
| - | |
| 464 | + | |
465 | 465 |
| |
466 | 466 |
| |
467 | 467 |
| |
468 |
| - | |
| 468 | + | |
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
| |||
482 | 482 |
| |
483 | 483 |
| |
484 | 484 |
| |
485 |
| - | |
| 485 | + | |
486 | 486 |
| |
487 | 487 |
| |
488 | 488 |
| |
489 | 489 |
| |
490 | 490 |
| |
491 |
| - | |
| 491 | + | |
492 | 492 |
| |
493 | 493 |
| |
494 | 494 |
| |
|
Lines changed: 10 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
496 | 496 |
| |
497 | 497 |
| |
498 | 498 |
| |
499 |
| - | |
| 499 | + | |
500 | 500 |
| |
501 | 501 |
| |
502 | 502 |
| |
| |||
512 | 512 |
| |
513 | 513 |
| |
514 | 514 |
| |
515 |
| - | |
| 515 | + | |
516 | 516 |
| |
517 |
| - | |
| 517 | + | |
518 | 518 |
| |
519 | 519 |
| |
520 | 520 |
| |
| |||
532 | 532 |
| |
533 | 533 |
| |
534 | 534 |
| |
535 |
| - | |
| 535 | + | |
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
539 | 539 |
| |
540 | 540 |
| |
541 |
| - | |
| 541 | + | |
542 | 542 |
| |
543 | 543 |
| |
544 | 544 |
| |
| |||
822 | 822 |
| |
823 | 823 |
| |
824 | 824 |
| |
825 |
| - | |
| 825 | + | |
826 | 826 |
| |
827 | 827 |
| |
828 | 828 |
| |
| |||
843 | 843 |
| |
844 | 844 |
| |
845 | 845 |
| |
846 |
| - | |
| 846 | + | |
847 | 847 |
| |
848 | 848 |
| |
849 | 849 |
| |
850 |
| - | |
| 850 | + | |
851 | 851 |
| |
852 | 852 |
| |
853 | 853 |
| |
| |||
862 | 862 |
| |
863 | 863 |
| |
864 | 864 |
| |
865 |
| - | |
| 865 | + | |
866 | 866 |
| |
867 | 867 |
| |
868 | 868 |
| |
869 | 869 |
| |
870 | 870 |
| |
871 |
| - | |
| 871 | + | |
872 | 872 |
|
Lines changed: 7 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
| 70 | + | |
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 | 74 |
| |
75 |
| - | |
| 75 | + | |
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
101 |
| - | |
| 100 | + | |
| 101 | + | |
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| |||
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
115 |
| - | |
116 |
| - | |
| 115 | + | |
| 116 | + | |
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
329 |
| - | |
| 329 | + | |
330 | 330 |
| |
331 | 331 |
| |
332 | 332 |
| |
| |||
386 | 386 |
| |
387 | 387 |
| |
388 | 388 |
| |
389 |
| - | |
| 389 | + | |
390 | 390 |
| |
391 | 391 |
| |
392 | 392 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
389 | 389 |
| |
390 | 390 |
| |
391 | 391 |
| |
392 |
| - | |
| 392 | + | |
393 | 393 |
| |
394 | 394 |
| |
395 | 395 |
| |
| |||
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
539 |
| - | |
| 539 | + | |
540 | 540 |
| |
541 | 541 |
| |
542 | 542 |
| |
|
0 commit comments
Comments
(0)