forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6df7a96
committed
Multirange datatypes
Multiranges are basically sorted arrays of non-overlapping ranges withset-theoretic operations defined over them.Since v14, each range type automatically gets a corresponding multirangedatatype. There are both manual and automatic mechanisms for naming multirangetypes. Once can specify multirange type name using multirange_type_nameattribute in CREATE TYPE. Otherwise, a multirange type name is generatedautomatically. If the range type name contains "range" then we change that to"multirange". Otherwise, we add "_multirange" to the end.Implementation of multiranges comes with a space-efficient internalrepresentation format, which evades extra paddings and duplicated storage ofoids. Altogether this format allows fetching a particular range by its indexin O(n).Statistic gathering and selectivity estimation are implemented for multiranges.For this purpose, stored multirange is approximated as union range without gaps.This field will likely need improvements in the future.Catversion is bumped.Discussion:https://postgr.es/m/CALNJ-vSUpQ_Y%3DjXvTxt1VYFztaBSsWVXeF1y6gTYQ4bOiWDLgQ%40mail.gmail.comDiscussion:https://postgr.es/m/a0b8026459d1e6167933be2104a6174e7d40d0ab.camel%40j-davis.com#fe7218c83b08068bfffb0c5293eceda0Author: Paul Jungwirth, revised by meReviewed-by: David Fetter, Corey Huinker, Jeff Davis, Pavel StehuleReviewed-by: Alvaro Herrera, Tom Lane, Isaac Morland, David G. JohnstonReviewed-by: Zhihong Yu, Alexander Korotkov1 parent08b01d4 commit6df7a96
File tree
67 files changed
+10568
-270
lines changed- doc/src/sgml
- ref
- src
- backend
- catalog
- commands
- executor
- parser
- utils
- adt
- cache
- fmgr
- bin/pg_dump
- t
- include
- access
- catalog
- commands
- utils
- pl/plpgsql/src
- test/regress
- expected
- sql
- tools/pgindent
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
67 files changed
+10568
-270
lines changedLines changed: 13 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6237 | 6237 |
| |
6238 | 6238 |
| |
6239 | 6239 |
| |
| 6240 | + | |
| 6241 | + | |
| 6242 | + | |
| 6243 | + | |
| 6244 | + | |
| 6245 | + | |
| 6246 | + | |
| 6247 | + | |
| 6248 | + | |
| 6249 | + | |
6240 | 6250 |
| |
6241 | 6251 |
| |
6242 | 6252 |
| |
| |||
8671 | 8681 |
| |
8672 | 8682 |
| |
8673 | 8683 |
| |
8674 |
| - | |
8675 |
| - | |
| 8684 | + | |
| 8685 | + | |
| 8686 | + | |
8676 | 8687 |
| |
8677 | 8688 |
| |
8678 | 8689 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4907 | 4907 |
| |
4908 | 4908 |
| |
4909 | 4909 |
| |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
4910 | 4914 |
| |
4911 | 4915 |
| |
4912 | 4916 |
| |
| |||
4923 | 4927 |
| |
4924 | 4928 |
| |
4925 | 4929 |
| |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
| 4933 | + | |
4926 | 4934 |
| |
4927 | 4935 |
| |
4928 | 4936 |
| |
| |||
5034 | 5042 |
| |
5035 | 5043 |
| |
5036 | 5044 |
| |
| 5045 | + | |
| 5046 | + | |
| 5047 | + | |
| 5048 | + | |
| 5049 | + | |
| 5050 | + | |
| 5051 | + | |
5037 | 5052 |
| |
5038 | 5053 |
| |
5039 | 5054 |
| |
| |||
5063 | 5078 |
| |
5064 | 5079 |
| |
5065 | 5080 |
| |
| 5081 | + | |
| 5082 | + | |
| 5083 | + | |
| 5084 | + | |
| 5085 | + | |
| 5086 | + | |
| 5087 | + | |
| 5088 | + | |
5066 | 5089 |
| |
5067 | 5090 |
| |
5068 | 5091 |
| |
|
Lines changed: 45 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
288 | 288 |
| |
289 | 289 |
| |
290 | 290 |
| |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
291 | 299 |
| |
292 | 300 |
| |
293 | 301 |
| |
| |||
319 | 327 |
| |
320 | 328 |
| |
321 | 329 |
| |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
322 | 338 |
| |
323 | 339 |
| |
324 | 340 |
| |
| |||
346 | 362 |
| |
347 | 363 |
| |
348 | 364 |
| |
349 |
| - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
350 | 370 |
| |
351 | 371 |
| |
352 | 372 |
| |
353 | 373 |
| |
354 |
| - | |
355 |
| - | |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 | 374 |
| |
361 | 375 |
| |
362 | 376 |
| |
| |||
365 | 379 |
| |
366 | 380 |
| |
367 | 381 |
| |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
368 | 395 |
| |
369 | 396 |
| |
370 | 397 |
| |
| |||
420 | 447 |
| |
421 | 448 |
| |
422 | 449 |
| |
423 |
| - | |
| 450 | + | |
| 451 | + | |
424 | 452 |
| |
425 | 453 |
| |
426 | 454 |
| |
| |||
431 | 459 |
| |
432 | 460 |
| |
433 | 461 |
| |
434 |
| - | |
435 |
| - | |
436 |
| - | |
437 |
| - | |
438 |
| - | |
439 |
| - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
440 | 471 |
| |
441 | 472 |
| |
442 | 473 |
| |
|
0 commit comments
Comments
(0)