forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1934055
committed
Please find a small patch to fix the brain damage "century" and
"millennium" date part implementation in postgresql, both in the codeand the documentation, so that it conforms to the official definition.If you do not agree with the official definition, please send yourcomplaint to "pope@vatican.org". I'm not responsible for them;-)With the previous version, the centuries and millenniums had a wrongnumber and started the wrong year. Moreover century number 0, which doesnot exist in reality, lasted 200 years. Also, millennium number 0 lasted2000 years.If you want postgresql to have it's own definition of "century" and"millennium" that does not conform to the one of the society, just givethem another name. I would suggest "pgCENTURY" and "pgMILLENNIUM";-)IMO, if someone may use the options, it means that postgresql is used forhistorical data, so it make sense to have an historical definition. Also,I just want to divide the year by 100 or 1000, I can do that quite easily.BACKWARD INCOMPATIBLE CHANGEFabien Coelho - coelho@cri.ensmp.fr1 parent296f485 commit1934055
File tree
4 files changed
+176
-14
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+176
-14
lines changedLines changed: 23 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
4948 | 4948 |
| |
4949 | 4949 |
| |
4950 | 4950 |
| |
4951 |
| - | |
| 4951 | + | |
4952 | 4952 |
| |
4953 | 4953 |
| |
4954 | 4954 |
| |
4955 |
| - | |
| 4955 | + | |
4956 | 4956 |
| |
| 4957 | + | |
| 4958 | + | |
4957 | 4959 |
| |
4958 | 4960 |
| |
4959 | 4961 |
| |
4960 |
| - | |
4961 |
| - | |
4962 |
| - | |
| 4962 | + | |
| 4963 | + | |
| 4964 | + | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
4963 | 4976 |
| |
4964 | 4977 |
| |
4965 | 4978 |
| |
| |||
5083 | 5096 |
| |
5084 | 5097 |
| |
5085 | 5098 |
| |
5086 |
| - | |
| 5099 | + | |
5087 | 5100 |
| |
5088 | 5101 |
| |
5089 | 5102 |
| |
5090 | 5103 |
| |
5091 |
| - | |
| 5104 | + | |
5092 | 5105 |
| |
5093 | 5106 |
| |
5094 | 5107 |
| |
5095 |
| - | |
5096 |
| - | |
5097 |
| - | |
| 5108 | + | |
| 5109 | + | |
5098 | 5110 |
| |
5099 | 5111 |
| |
5100 | 5112 |
| |
|
Lines changed: 15 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
3273 | 3273 |
| |
3274 | 3274 |
| |
3275 | 3275 |
| |
3276 |
| - | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
3277 | 3285 |
| |
3278 | 3286 |
| |
3279 | 3287 |
| |
3280 |
| - | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
3281 | 3293 |
| |
3282 | 3294 |
| |
3283 | 3295 |
| |
|
Lines changed: 111 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
819 | 819 |
| |
820 | 820 |
| |
821 | 821 |
| |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + |
Lines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
208 | 208 |
| |
209 | 209 |
| |
210 | 210 |
| |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + |
0 commit comments
Comments
(0)