- Notifications
You must be signed in to change notification settings - Fork5
Commit01f7808
committed
Add a cardinality function for arrays.
Unlike our other array functions, this considers the total number ofelements across all dimensions, and returns 0 rather than NULL when thearray has no elements. But it seems that both of those behaviors arealmost universally disliked, so hopefully that's OK.Marko Tiikkaja, reviewed by Dean Rasheed and Pavel Stehule1 parent033b234 commit01f7808
File tree
8 files changed
+93
-1
lines changed- doc/src/sgml
- src
- backend/utils/adt
- include
- catalog
- utils
- test/regress
- expected
- sql
8 files changed
+93
-1
lines changedLines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
340 | 353 |
| |
341 | 354 |
| |
342 | 355 |
| |
|
Lines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11008 | 11008 |
| |
11009 | 11009 |
| |
11010 | 11010 |
| |
| 11011 | + | |
| 11012 | + | |
| 11013 | + | |
11011 | 11014 |
| |
11012 | 11015 |
| |
11013 | 11016 |
| |
| |||
11164 | 11167 |
| |
11165 | 11168 |
| |
11166 | 11169 |
| |
| 11170 | + | |
| 11171 | + | |
| 11172 | + | |
| 11173 | + | |
| 11174 | + | |
| 11175 | + | |
| 11176 | + | |
| 11177 | + | |
| 11178 | + | |
| 11179 | + | |
| 11180 | + | |
11167 | 11181 |
| |
11168 | 11182 |
| |
11169 | 11183 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1739 | 1739 |
| |
1740 | 1740 |
| |
1741 | 1741 |
| |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
1742 | 1754 |
| |
1743 | 1755 |
| |
1744 | 1756 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 |
| - | |
| 56 | + | |
57 | 57 |
| |
58 | 58 |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
840 | 840 |
| |
841 | 841 |
| |
842 | 842 |
| |
| 843 | + | |
| 844 | + | |
843 | 845 |
| |
844 | 846 |
| |
845 | 847 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
204 | 204 |
| |
205 | 205 |
| |
206 | 206 |
| |
| 207 | + | |
207 | 208 |
| |
208 | 209 |
| |
209 | 210 |
| |
|
Lines changed: 42 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1455 | 1455 |
| |
1456 | 1456 |
| |
1457 | 1457 |
| |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
1458 | 1500 |
| |
1459 | 1501 |
| |
1460 | 1502 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
422 | 430 |
| |
423 | 431 |
| |
424 | 432 |
| |
|
0 commit comments
Comments
(0)