- Notifications
You must be signed in to change notification settings - Fork5
Commite4a6ebf
committed
Make bit/varbit substring() treat any negative length as meaning "all the rest
of the string". The previous coding treated only -1 that way, and wouldproduce an invalid result value for other negative values.We ought to fix it so that 2-parameter bit substring() is a different Cfunction and the 3-parameter form throws error for negative length, butthat takes a pg_proc change which is impractical in the back branches;and in any case somebody might be relying on -1 working this way.So just do this as a back-patchable fix.1 parent82170c7 commite4a6ebf
1 file changed
+17
-7
lines changedLines changed: 17 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
945 | 945 |
| |
946 | 946 |
| |
947 | 947 |
| |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
952 | 948 |
| |
953 |
| - | |
954 |
| - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
955 | 965 |
| |
956 | 966 |
| |
957 | 967 |
| |
|
0 commit comments
Comments
(0)