@viberaven/sessions 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +41 -0
  3. package/README.md +136 -2
  4. package/THIRD_PARTY_NOTICES +6770 -0
  5. package/dist/browser.mjs +2642 -0
  6. package/examples/quickstart.mjs +11 -0
  7. package/licenses/Emscripten.txt +101 -0
  8. package/licenses/ICU.txt +542 -0
  9. package/licenses/OSSP-UUID.txt +24 -0
  10. package/licenses/OpenSSL.txt +177 -0
  11. package/licenses/PGlite.txt +176 -0
  12. package/licenses/PostgreSQL-extra.txt +3592 -0
  13. package/licenses/PostgreSQL.txt +23 -0
  14. package/licenses/README.md +36 -0
  15. package/licenses/Snowball.txt +29 -0
  16. package/licenses/async-mutex.txt +21 -0
  17. package/licenses/base64-js.txt +21 -0
  18. package/licenses/buffer.txt +21 -0
  19. package/licenses/compiler-rt.txt +311 -0
  20. package/licenses/dlmalloc.txt +135 -0
  21. package/licenses/esbuild.txt +21 -0
  22. package/licenses/ieee754.txt +11 -0
  23. package/licenses/libcxx.txt +311 -0
  24. package/licenses/libcxxabi.txt +311 -0
  25. package/licenses/libunwind.txt +311 -0
  26. package/licenses/libxml2-extra.txt +34 -0
  27. package/licenses/libxml2.txt +24 -0
  28. package/licenses/libxslt.txt +53 -0
  29. package/licenses/musl.txt +193 -0
  30. package/licenses/pg-protocol.txt +21 -0
  31. package/licenses/tinytar.txt +21 -0
  32. package/licenses/tslib.txt +28 -0
  33. package/licenses/tsup.txt +21 -0
  34. package/licenses/zlib.txt +22 -0
  35. package/package.json +74 -4
  36. package/runtime/engine/frozen/runtime/engine-host.mjs +377 -0
  37. package/runtime/engine/frozen/runtime/engine-logs/static-layout.json +21357 -0
  38. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/amcheck.tar.gz +0 -0
  39. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/auth_delay.tar.gz +0 -0
  40. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/auto_explain.tar.gz +0 -0
  41. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/basebackup_to_shell.tar.gz +0 -0
  42. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/basic_archive.tar.gz +0 -0
  43. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/bloom.tar.gz +0 -0
  44. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/btree_gin.tar.gz +0 -0
  45. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/btree_gist.tar.gz +0 -0
  46. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-5L4W4HOZ.js +3 -0
  47. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-C56CJGL3.js +6 -0
  48. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-CMNLZGEJ.js +2 -0
  49. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-DAMXLPQW.js +2 -0
  50. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-EZSFBMVG.js +2 -0
  51. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-GS6VKQIC.js +2 -0
  52. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-OCWZREWN.js +2 -0
  53. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-UQDQKWPM.js +2 -0
  54. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/chunk-YFZE77YQ.js +9 -0
  55. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/citext.tar.gz +0 -0
  56. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/amcheck.js +2 -0
  57. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/auto_explain.js +2 -0
  58. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/bloom.js +2 -0
  59. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/btree_gin.js +2 -0
  60. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/btree_gist.js +2 -0
  61. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/citext.js +2 -0
  62. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/cube.js +2 -0
  63. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/dict_int.js +2 -0
  64. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/dict_xsyn.js +2 -0
  65. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/earthdistance.js +2 -0
  66. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/file_fdw.js +2 -0
  67. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/fuzzystrmatch.js +2 -0
  68. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/hstore.js +2 -0
  69. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/intarray.js +2 -0
  70. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/isn.js +2 -0
  71. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/lo.js +2 -0
  72. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/ltree.js +2 -0
  73. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/moddatetime.js +2 -0
  74. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pageinspect.js +2 -0
  75. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_buffercache.js +2 -0
  76. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_freespacemap.js +2 -0
  77. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_stat_statements.js +2 -0
  78. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_surgery.js +2 -0
  79. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_trgm.js +2 -0
  80. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_visibility.js +2 -0
  81. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pg_walinspect.js +2 -0
  82. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/pgcrypto.js +2 -0
  83. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/seg.js +2 -0
  84. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tablefunc.js +2 -0
  85. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tcn.js +2 -0
  86. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tsm_system_rows.js +2 -0
  87. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/tsm_system_time.js +2 -0
  88. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/unaccent.js +2 -0
  89. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/contrib/uuid_ossp.js +2 -0
  90. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/cube.tar.gz +0 -0
  91. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/dblink.tar.gz +0 -0
  92. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/dict_int.tar.gz +0 -0
  93. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/dict_xsyn.tar.gz +0 -0
  94. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/earthdistance.tar.gz +0 -0
  95. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/file_fdw.tar.gz +0 -0
  96. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/base.js +2 -0
  97. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/memfs-frontend.js +2 -0
  98. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/memfs2opfs.js +2 -0
  99. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/nodefs.js +2 -0
  100. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fs/opfs-ahp.js +4 -0
  101. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/fuzzystrmatch.tar.gz +0 -0
  102. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/hstore.tar.gz +0 -0
  103. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/index.js +2 -0
  104. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/initdb.js +2 -0
  105. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/initdb.wasm +0 -0
  106. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/intagg.tar.gz +0 -0
  107. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/intarray.tar.gz +0 -0
  108. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/isn.tar.gz +0 -0
  109. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/live/index.js +134 -0
  110. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/lo.tar.gz +0 -0
  111. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/ltree.tar.gz +0 -0
  112. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/node-postgres/index.js +2 -0
  113. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/oid2name.tar.gz +0 -0
  114. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pageinspect.tar.gz +0 -0
  115. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/passwordcheck.tar.gz +0 -0
  116. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_buffercache.tar.gz +0 -0
  117. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_freespacemap.tar.gz +0 -0
  118. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_logicalinspect.tar.gz +0 -0
  119. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_overexplain.tar.gz +0 -0
  120. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_prewarm.tar.gz +0 -0
  121. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_stat_statements.tar.gz +0 -0
  122. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_surgery.tar.gz +0 -0
  123. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_trgm.tar.gz +0 -0
  124. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_visibility.tar.gz +0 -0
  125. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pg_walinspect.tar.gz +0 -0
  126. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pgcrypto.tar.gz +0 -0
  127. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pglite.data +37614 -8
  128. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pglite.js +2 -0
  129. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pglite.wasm +0 -0
  130. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pgrowlocks.tar.gz +0 -0
  131. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/pgstattuple.tar.gz +0 -0
  132. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/postgres_fdw.tar.gz +0 -0
  133. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/seg.tar.gz +0 -0
  134. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/spi.tar.gz +0 -0
  135. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tablefunc.tar.gz +0 -0
  136. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tcn.tar.gz +0 -0
  137. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/templating.js +2 -0
  138. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/test_decoding.tar.gz +0 -0
  139. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tsm_system_rows.tar.gz +0 -0
  140. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/tsm_system_time.tar.gz +0 -0
  141. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/unaccent.tar.gz +0 -0
  142. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/uuid-ossp.tar.gz +0 -0
  143. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/vacuumlo.tar.gz +0 -0
  144. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/worker/index.js +2 -0
  145. package/runtime/engine/frozen/runtime/pglite/packages/pglite/dist/xml2.tar.gz +0 -0
  146. package/runtime/race/pin.mjs +12 -0
  147. package/runtime/runtime-manifest.json +579 -0
  148. package/runtime/wait/initial-image.tgz +0 -0
  149. package/runtime/wait/wire.mjs +39 -0
  150. package/src/browser-platform.mjs +12 -0
  151. package/src/browser.d.ts +5 -0
  152. package/src/browser.mjs +43 -0
  153. package/src/index.d.ts +45 -0
  154. package/src/index.mjs +22 -0
  155. package/src/runtime-integrity.mjs +46 -0
@@ -0,0 +1,3592 @@
1
+ src/backend/lib/hyperloglog.c
2
+
3
+ /*-------------------------------------------------------------------------
4
+ *
5
+ * hyperloglog.c
6
+ * HyperLogLog cardinality estimator
7
+ *
8
+ * Portions Copyright (c) 2014-2025, PostgreSQL Global Development Group
9
+ *
10
+ * Based on Hideaki Ohno's C++ implementation. This is probably not ideally
11
+ * suited to estimating the cardinality of very large sets; in particular, we
12
+ * have not attempted to further optimize the implementation as described in
13
+ * the Heule, Nunkesser and Hall paper "HyperLogLog in Practice: Algorithmic
14
+ * Engineering of a State of The Art Cardinality Estimation Algorithm".
15
+ *
16
+ * A sparse representation of HyperLogLog state is used, with fixed space
17
+ * overhead.
18
+ *
19
+ * The copyright terms of Ohno's original version (the MIT license) follow.
20
+ *
21
+ * IDENTIFICATION
22
+ * src/backend/lib/hyperloglog.c
23
+ *
24
+ *-------------------------------------------------------------------------
25
+ */
26
+
27
+ /*
28
+ * Copyright (c) 2013 Hideaki Ohno <hide.o.j55{at}gmail.com>
29
+ *
30
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
31
+ * of this software and associated documentation files (the 'Software'), to
32
+ * deal in the Software without restriction, including without limitation the
33
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
34
+ * sell copies of the Software, and to permit persons to whom the Software is
35
+ * furnished to do so, subject to the following conditions:
36
+ *
37
+ * The above copyright notice and this permission notice shall be included in
38
+ * all copies or substantial portions of the Software.
39
+ *
40
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
46
+ * IN THE SOFTWARE.
47
+ */
48
+
49
+ ---
50
+
51
+ src/backend/lib/rbtree.c
52
+
53
+ /*-------------------------------------------------------------------------
54
+ *
55
+ * rbtree.c
56
+ * implementation for PostgreSQL generic Red-Black binary tree package
57
+ * Adopted from http://algolist.manual.ru/ds/rbtree.php
58
+ *
59
+ * This code comes from Thomas Niemann's "Sorting and Searching Algorithms:
60
+ * a Cookbook".
61
+ *
62
+ * See http://www.cs.auckland.ac.nz/software/AlgAnim/niemann/s_man.htm for
63
+ * license terms: "Source code, when part of a software project, may be used
64
+ * freely without reference to the author."
65
+ *
66
+ * Red-black trees are a type of balanced binary tree wherein (1) any child of
67
+ * a red node is always black, and (2) every path from root to leaf traverses
68
+ * an equal number of black nodes. From these properties, it follows that the
69
+ * longest path from root to leaf is only about twice as long as the shortest,
70
+ * so lookups are guaranteed to run in O(lg n) time.
71
+ *
72
+ * Copyright (c) 2009-2025, PostgreSQL Global Development Group
73
+ *
74
+ * IDENTIFICATION
75
+ * src/backend/lib/rbtree.c
76
+ *
77
+ *-------------------------------------------------------------------------
78
+ */
79
+
80
+ ---
81
+
82
+ src/backend/optimizer/geqo/geqo_copy.c
83
+
84
+ /*------------------------------------------------------------------------
85
+ *
86
+ * geqo_copy.c
87
+ *
88
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
89
+ * Portions Copyright (c) 1994, Regents of the University of California
90
+ *
91
+ * src/backend/optimizer/geqo/geqo_copy.c
92
+ *
93
+ *-------------------------------------------------------------------------
94
+ */
95
+
96
+ /* contributed by:
97
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
98
+ * Martin Utesch * Institute of Automatic Control *
99
+ = = University of Mining and Technology =
100
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
101
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
102
+ */
103
+
104
+ /* this is adopted from D. Whitley's Genitor algorithm */
105
+
106
+ /*************************************************************/
107
+ /* */
108
+ /* Copyright (c) 1990 */
109
+ /* Darrell L. Whitley */
110
+ /* Computer Science Department */
111
+ /* Colorado State University */
112
+ /* */
113
+ /* Permission is hereby granted to copy all or any part of */
114
+ /* this program for free distribution. The author's name */
115
+ /* and this copyright notice must be included in any copy. */
116
+ /* */
117
+ /*************************************************************/
118
+
119
+ ---
120
+
121
+ src/backend/optimizer/geqo/geqo_cx.c
122
+
123
+ /*------------------------------------------------------------------------
124
+ *
125
+ * geqo_cx.c
126
+ *
127
+ * cycle crossover [CX] routines;
128
+ * CX operator according to Oliver et al
129
+ * (Proc 2nd Int'l Conf on GA's)
130
+ *
131
+ * src/backend/optimizer/geqo/geqo_cx.c
132
+ *
133
+ *-------------------------------------------------------------------------
134
+ */
135
+
136
+ /* contributed by:
137
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
138
+ * Martin Utesch * Institute of Automatic Control *
139
+ = = University of Mining and Technology =
140
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
141
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
142
+ */
143
+
144
+ /* the cx algorithm is adopted from Genitor : */
145
+ /*************************************************************/
146
+ /* */
147
+ /* Copyright (c) 1990 */
148
+ /* Darrell L. Whitley */
149
+ /* Computer Science Department */
150
+ /* Colorado State University */
151
+ /* */
152
+ /* Permission is hereby granted to copy all or any part of */
153
+ /* this program for free distribution. The author's name */
154
+ /* and this copyright notice must be included in any copy. */
155
+ /* */
156
+ /*************************************************************/
157
+
158
+ ---
159
+
160
+ src/backend/optimizer/geqo/geqo_erx.c
161
+
162
+ /*------------------------------------------------------------------------
163
+ *
164
+ * geqo_erx.c
165
+ * edge recombination crossover [ER]
166
+ *
167
+ * src/backend/optimizer/geqo/geqo_erx.c
168
+ *
169
+ *-------------------------------------------------------------------------
170
+ */
171
+
172
+ /* contributed by:
173
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
174
+ * Martin Utesch * Institute of Automatic Control *
175
+ = = University of Mining and Technology =
176
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
177
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
178
+ */
179
+
180
+ /* the edge recombination algorithm is adopted from Genitor : */
181
+ /*************************************************************/
182
+ /* */
183
+ /* Copyright (c) 1990 */
184
+ /* Darrell L. Whitley */
185
+ /* Computer Science Department */
186
+ /* Colorado State University */
187
+ /* */
188
+ /* Permission is hereby granted to copy all or any part of */
189
+ /* this program for free distribution. The author's name */
190
+ /* and this copyright notice must be included in any copy. */
191
+ /* */
192
+ /*************************************************************/
193
+
194
+ ---
195
+
196
+ src/backend/optimizer/geqo/geqo_mutation.c
197
+
198
+ /*------------------------------------------------------------------------
199
+ *
200
+ * geqo_mutation.c
201
+ *
202
+ * TSP mutation routines
203
+ *
204
+ * src/backend/optimizer/geqo/geqo_mutation.c
205
+ *
206
+ *-------------------------------------------------------------------------
207
+ */
208
+
209
+ /* contributed by:
210
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
211
+ * Martin Utesch * Institute of Automatic Control *
212
+ = = University of Mining and Technology =
213
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
214
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
215
+ */
216
+
217
+ /* this is adopted from Genitor : */
218
+ /*************************************************************/
219
+ /* */
220
+ /* Copyright (c) 1990 */
221
+ /* Darrell L. Whitley */
222
+ /* Computer Science Department */
223
+ /* Colorado State University */
224
+ /* */
225
+ /* Permission is hereby granted to copy all or any part of */
226
+ /* this program for free distribution. The author's name */
227
+ /* and this copyright notice must be included in any copy. */
228
+ /* */
229
+ /*************************************************************/
230
+
231
+ ---
232
+
233
+ src/backend/optimizer/geqo/geqo_ox1.c
234
+
235
+ /*------------------------------------------------------------------------
236
+ *
237
+ * geqo_ox1.c
238
+ *
239
+ * order crossover [OX] routines;
240
+ * OX1 operator according to Davis
241
+ * (Proc Int'l Joint Conf on AI)
242
+ *
243
+ * src/backend/optimizer/geqo/geqo_ox1.c
244
+ *
245
+ *-------------------------------------------------------------------------
246
+ */
247
+
248
+ /* contributed by:
249
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
250
+ * Martin Utesch * Institute of Automatic Control *
251
+ = = University of Mining and Technology =
252
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
253
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
254
+ */
255
+
256
+ /* the ox algorithm is adopted from Genitor : */
257
+ /*************************************************************/
258
+ /* */
259
+ /* Copyright (c) 1990 */
260
+ /* Darrell L. Whitley */
261
+ /* Computer Science Department */
262
+ /* Colorado State University */
263
+ /* */
264
+ /* Permission is hereby granted to copy all or any part of */
265
+ /* this program for free distribution. The author's name */
266
+ /* and this copyright notice must be included in any copy. */
267
+ /* */
268
+ /*************************************************************/
269
+
270
+ ---
271
+
272
+ src/backend/optimizer/geqo/geqo_ox2.c
273
+
274
+ /*------------------------------------------------------------------------
275
+ *
276
+ * geqo_ox2.c
277
+ *
278
+ * order crossover [OX] routines;
279
+ * OX2 operator according to Syswerda
280
+ * (The Genetic Algorithms Handbook, ed L Davis)
281
+ *
282
+ * src/backend/optimizer/geqo/geqo_ox2.c
283
+ *
284
+ *-------------------------------------------------------------------------
285
+ */
286
+
287
+ /* contributed by:
288
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
289
+ * Martin Utesch * Institute of Automatic Control *
290
+ = = University of Mining and Technology =
291
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
292
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
293
+ */
294
+
295
+ /* the ox algorithm is adopted from Genitor : */
296
+ /*************************************************************/
297
+ /* */
298
+ /* Copyright (c) 1990 */
299
+ /* Darrell L. Whitley */
300
+ /* Computer Science Department */
301
+ /* Colorado State University */
302
+ /* */
303
+ /* Permission is hereby granted to copy all or any part of */
304
+ /* this program for free distribution. The author's name */
305
+ /* and this copyright notice must be included in any copy. */
306
+ /* */
307
+ /*************************************************************/
308
+
309
+ ---
310
+
311
+ src/backend/optimizer/geqo/geqo_pmx.c
312
+
313
+ /*------------------------------------------------------------------------
314
+ *
315
+ * geqo_pmx.c
316
+ *
317
+ * partially matched crossover [PMX] routines;
318
+ * PMX operator according to Goldberg & Lingle
319
+ * (Proc Int'l Conf on GA's)
320
+ *
321
+ * src/backend/optimizer/geqo/geqo_pmx.c
322
+ *
323
+ *-------------------------------------------------------------------------
324
+ */
325
+
326
+ /* contributed by:
327
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
328
+ * Martin Utesch * Institute of Automatic Control *
329
+ = = University of Mining and Technology =
330
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
331
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
332
+ */
333
+
334
+ /* the pmx algorithm is adopted from Genitor : */
335
+ /*************************************************************/
336
+ /* */
337
+ /* Copyright (c) 1990 */
338
+ /* Darrell L. Whitley */
339
+ /* Computer Science Department */
340
+ /* Colorado State University */
341
+ /* */
342
+ /* Permission is hereby granted to copy all or any part of */
343
+ /* this program for free distribution. The author's name */
344
+ /* and this copyright notice must be included in any copy. */
345
+ /* */
346
+ /*************************************************************/
347
+
348
+ ---
349
+
350
+ src/backend/optimizer/geqo/geqo_px.c
351
+
352
+ /*------------------------------------------------------------------------
353
+ *
354
+ * geqo_px.c
355
+ *
356
+ * position crossover [PX] routines;
357
+ * PX operator according to Syswerda
358
+ * (The Genetic Algorithms Handbook, L Davis, ed)
359
+ *
360
+ * src/backend/optimizer/geqo/geqo_px.c
361
+ *
362
+ *-------------------------------------------------------------------------
363
+ */
364
+
365
+ /* contributed by:
366
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
367
+ * Martin Utesch * Institute of Automatic Control *
368
+ = = University of Mining and Technology =
369
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
370
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
371
+ */
372
+
373
+ /* the px algorithm is adopted from Genitor : */
374
+ /*************************************************************/
375
+ /* */
376
+ /* Copyright (c) 1990 */
377
+ /* Darrell L. Whitley */
378
+ /* Computer Science Department */
379
+ /* Colorado State University */
380
+ /* */
381
+ /* Permission is hereby granted to copy all or any part of */
382
+ /* this program for free distribution. The author's name */
383
+ /* and this copyright notice must be included in any copy. */
384
+ /* */
385
+ /*************************************************************/
386
+
387
+ ---
388
+
389
+ src/backend/optimizer/geqo/geqo_selection.c
390
+
391
+ /*-------------------------------------------------------------------------
392
+ *
393
+ * geqo_selection.c
394
+ * linear selection scheme for the genetic query optimizer
395
+ *
396
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
397
+ * Portions Copyright (c) 1994, Regents of the University of California
398
+ *
399
+ * src/backend/optimizer/geqo/geqo_selection.c
400
+ *
401
+ *-------------------------------------------------------------------------
402
+ */
403
+
404
+ /* contributed by:
405
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
406
+ * Martin Utesch * Institute of Automatic Control *
407
+ = = University of Mining and Technology =
408
+ * utesch@aut.tu-freiberg.de * Freiberg, Germany *
409
+ =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
410
+ */
411
+
412
+ /* this is adopted from D. Whitley's Genitor algorithm */
413
+
414
+ /*************************************************************/
415
+ /* */
416
+ /* Copyright (c) 1990 */
417
+ /* Darrell L. Whitley */
418
+ /* Computer Science Department */
419
+ /* Colorado State University */
420
+ /* */
421
+ /* Permission is hereby granted to copy all or any part of */
422
+ /* this program for free distribution. The author's name */
423
+ /* and this copyright notice must be included in any copy. */
424
+ /* */
425
+ /*************************************************************/
426
+
427
+ ---
428
+
429
+ src/backend/regex/regcomp.c
430
+
431
+ /*
432
+ * re_*comp and friends - compile REs
433
+ * This file #includes several others (see the bottom).
434
+ *
435
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
436
+ *
437
+ * Development of this software was funded, in part, by Cray Research Inc.,
438
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
439
+ * Corporation, none of whom are responsible for the results. The author
440
+ * thanks all of them.
441
+ *
442
+ * Redistribution and use in source and binary forms -- with or without
443
+ * modification -- are permitted for any purpose, provided that
444
+ * redistributions in source form retain this entire copyright notice and
445
+ * indicate the origin and nature of any modifications.
446
+ *
447
+ * I'd appreciate being given credit for this package in the documentation
448
+ * of software which uses it, but that is not a requirement.
449
+ *
450
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
451
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
452
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
453
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
454
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
455
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
456
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
457
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
458
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
459
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
460
+ *
461
+ * src/backend/regex/regcomp.c
462
+ *
463
+ */
464
+
465
+ ---
466
+
467
+ src/backend/regex/regc_color.c
468
+
469
+ /*
470
+ * colorings of characters
471
+ * This file is #included by regcomp.c.
472
+ *
473
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
474
+ *
475
+ * Development of this software was funded, in part, by Cray Research Inc.,
476
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
477
+ * Corporation, none of whom are responsible for the results. The author
478
+ * thanks all of them.
479
+ *
480
+ * Redistribution and use in source and binary forms -- with or without
481
+ * modification -- are permitted for any purpose, provided that
482
+ * redistributions in source form retain this entire copyright notice and
483
+ * indicate the origin and nature of any modifications.
484
+ *
485
+ * I'd appreciate being given credit for this package in the documentation
486
+ * of software which uses it, but that is not a requirement.
487
+ *
488
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
489
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
490
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
491
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
492
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
493
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
494
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
495
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
496
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
497
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
498
+ *
499
+ * src/backend/regex/regc_color.c
500
+ *
501
+ *
502
+ * Note that there are some incestuous relationships between this code and
503
+ * NFA arc maintenance, which perhaps ought to be cleaned up sometime.
504
+ */
505
+
506
+ ---
507
+
508
+ src/backend/regex/regc_cvec.c
509
+
510
+ /*
511
+ * Utility functions for handling cvecs
512
+ * This file is #included by regcomp.c.
513
+ *
514
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
515
+ *
516
+ * Development of this software was funded, in part, by Cray Research Inc.,
517
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
518
+ * Corporation, none of whom are responsible for the results. The author
519
+ * thanks all of them.
520
+ *
521
+ * Redistribution and use in source and binary forms -- with or without
522
+ * modification -- are permitted for any purpose, provided that
523
+ * redistributions in source form retain this entire copyright notice and
524
+ * indicate the origin and nature of any modifications.
525
+ *
526
+ * I'd appreciate being given credit for this package in the documentation
527
+ * of software which uses it, but that is not a requirement.
528
+ *
529
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
530
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
531
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
532
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
533
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
534
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
535
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
536
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
537
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
538
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
539
+ *
540
+ * src/backend/regex/regc_cvec.c
541
+ *
542
+ */
543
+
544
+ /*
545
+ * Notes:
546
+ * Only (selected) functions in _this_ file should treat the chr arrays
547
+ * of a cvec as non-constant.
548
+ */
549
+
550
+ /*
551
+ * newcvec - allocate a new cvec
552
+ *
553
+ * Note: in current usage, nchrs and nranges are never so large that we risk
554
+ * integer overflow in these size calculations, even with 32-bit size_t.
555
+ */
556
+
557
+ ---
558
+
559
+ src/backend/regex/regc_lex.c
560
+
561
+ /*
562
+ * lexical analyzer
563
+ * This file is #included by regcomp.c.
564
+ *
565
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
566
+ *
567
+ * Development of this software was funded, in part, by Cray Research Inc.,
568
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
569
+ * Corporation, none of whom are responsible for the results. The author
570
+ * thanks all of them.
571
+ *
572
+ * Redistribution and use in source and binary forms -- with or without
573
+ * modification -- are permitted for any purpose, provided that
574
+ * redistributions in source form retain this entire copyright notice and
575
+ * indicate the origin and nature of any modifications.
576
+ *
577
+ * I'd appreciate being given credit for this package in the documentation
578
+ * of software which uses it, but that is not a requirement.
579
+ *
580
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
581
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
582
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
583
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
584
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
585
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
586
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
587
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
588
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
589
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
590
+ *
591
+ * src/backend/regex/regc_lex.c
592
+ *
593
+ */
594
+
595
+ /* scanning macros (know about v) */
596
+
597
+ ---
598
+
599
+ src/backend/regex/regc_locale.c
600
+
601
+ /*
602
+ * regc_locale.c --
603
+ *
604
+ * This file contains locale-specific regexp routines.
605
+ * This file is #included by regcomp.c.
606
+ *
607
+ * Copyright (c) 1998 by Scriptics Corporation.
608
+ *
609
+ * This software is copyrighted by the Regents of the University of
610
+ * California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
611
+ * Corporation and other parties. The following terms apply to all files
612
+ * associated with the software unless explicitly disclaimed in
613
+ * individual files.
614
+ *
615
+ * The authors hereby grant permission to use, copy, modify, distribute,
616
+ * and license this software and its documentation for any purpose, provided
617
+ * that existing copyright notices are retained in all copies and that this
618
+ * notice is included verbatim in any distributions. No written agreement,
619
+ * license, or royalty fee is required for any of the authorized uses.
620
+ * Modifications to this software may be copyrighted by their authors
621
+ * and need not follow the licensing terms described here, provided that
622
+ * the new terms are clearly indicated on the first page of each file where
623
+ * they apply.
624
+ *
625
+ * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
626
+ * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
627
+ * ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
628
+ * DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
629
+ * POSSIBILITY OF SUCH DAMAGE.
630
+ *
631
+ * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
632
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
633
+ * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
634
+ * IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
635
+ * NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
636
+ * MODIFICATIONS.
637
+ *
638
+ * GOVERNMENT USE: If you are acquiring this software on behalf of the
639
+ * U.S. government, the Government shall have only "Restricted Rights"
640
+ * in the software and related documentation as defined in the Federal
641
+ * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
642
+ * are acquiring the software on behalf of the Department of Defense, the
643
+ * software shall be classified as "Commercial Computer Software" and the
644
+ * Government shall have only "Restricted Rights" as defined in Clause
645
+ * 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
646
+ * authors grant the U.S. Government and others acting in its behalf
647
+ * permission to use and distribute the software in accordance with the
648
+ * terms specified in this license.
649
+ *
650
+ * src/backend/regex/regc_locale.c
651
+ */
652
+
653
+ /* ASCII character-name table */
654
+
655
+ ---
656
+
657
+ src/backend/regex/regc_nfa.c
658
+
659
+ /*
660
+ * NFA utilities.
661
+ * This file is #included by regcomp.c.
662
+ *
663
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
664
+ *
665
+ * Development of this software was funded, in part, by Cray Research Inc.,
666
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
667
+ * Corporation, none of whom are responsible for the results. The author
668
+ * thanks all of them.
669
+ *
670
+ * Redistribution and use in source and binary forms -- with or without
671
+ * modification -- are permitted for any purpose, provided that
672
+ * redistributions in source form retain this entire copyright notice and
673
+ * indicate the origin and nature of any modifications.
674
+ *
675
+ * I'd appreciate being given credit for this package in the documentation
676
+ * of software which uses it, but that is not a requirement.
677
+ *
678
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
679
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
680
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
681
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
682
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
683
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
684
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
685
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
686
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
687
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
688
+ *
689
+ * src/backend/regex/regc_nfa.c
690
+ *
691
+ *
692
+ * One or two things that technically ought to be in here
693
+ * are actually in color.c, thanks to some incestuous relationships in
694
+ * the color chains.
695
+ */
696
+
697
+ ---
698
+
699
+ src/backend/regex/regerror.c
700
+
701
+ /*
702
+ * regerror - error-code expansion
703
+ *
704
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
705
+ *
706
+ * Development of this software was funded, in part, by Cray Research Inc.,
707
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
708
+ * Corporation, none of whom are responsible for the results. The author
709
+ * thanks all of them.
710
+ *
711
+ * Redistribution and use in source and binary forms -- with or without
712
+ * modification -- are permitted for any purpose, provided that
713
+ * redistributions in source form retain this entire copyright notice and
714
+ * indicate the origin and nature of any modifications.
715
+ *
716
+ * I'd appreciate being given credit for this package in the documentation
717
+ * of software which uses it, but that is not a requirement.
718
+ *
719
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
720
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
721
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
722
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
723
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
724
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
725
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
726
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
727
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
728
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
729
+ *
730
+ * src/backend/regex/regerror.c
731
+ *
732
+ */
733
+
734
+ ---
735
+
736
+ src/backend/regex/regexec.c
737
+
738
+ /*
739
+ * re_*exec and friends - match REs
740
+ *
741
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
742
+ *
743
+ * Development of this software was funded, in part, by Cray Research Inc.,
744
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
745
+ * Corporation, none of whom are responsible for the results. The author
746
+ * thanks all of them.
747
+ *
748
+ * Redistribution and use in source and binary forms -- with or without
749
+ * modification -- are permitted for any purpose, provided that
750
+ * redistributions in source form retain this entire copyright notice and
751
+ * indicate the origin and nature of any modifications.
752
+ *
753
+ * I'd appreciate being given credit for this package in the documentation
754
+ * of software which uses it, but that is not a requirement.
755
+ *
756
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
757
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
758
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
759
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
760
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
761
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
762
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
763
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
764
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
765
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
766
+ *
767
+ * src/backend/regex/regexec.c
768
+ *
769
+ */
770
+
771
+ ---
772
+
773
+ src/backend/regex/rege_dfa.c
774
+
775
+ /*
776
+ * DFA routines
777
+ * This file is #included by regexec.c.
778
+ *
779
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
780
+ *
781
+ * Development of this software was funded, in part, by Cray Research Inc.,
782
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
783
+ * Corporation, none of whom are responsible for the results. The author
784
+ * thanks all of them.
785
+ *
786
+ * Redistribution and use in source and binary forms -- with or without
787
+ * modification -- are permitted for any purpose, provided that
788
+ * redistributions in source form retain this entire copyright notice and
789
+ * indicate the origin and nature of any modifications.
790
+ *
791
+ * I'd appreciate being given credit for this package in the documentation
792
+ * of software which uses it, but that is not a requirement.
793
+ *
794
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
795
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
796
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
797
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
798
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
799
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
800
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
801
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
802
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
803
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
804
+ *
805
+ * src/backend/regex/rege_dfa.c
806
+ *
807
+ */
808
+
809
+ /*
810
+ * longest - longest-preferred matching engine
811
+ *
812
+ * On success, returns match endpoint address. Returns NULL on no match.
813
+ * Internal errors also return NULL, with v->err set.
814
+ */
815
+
816
+ ---
817
+
818
+ src/backend/regex/regfree.c
819
+
820
+ /*
821
+ * regfree - free an RE
822
+ *
823
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
824
+ *
825
+ * Development of this software was funded, in part, by Cray Research Inc.,
826
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
827
+ * Corporation, none of whom are responsible for the results. The author
828
+ * thanks all of them.
829
+ *
830
+ * Redistribution and use in source and binary forms -- with or without
831
+ * modification -- are permitted for any purpose, provided that
832
+ * redistributions in source form retain this entire copyright notice and
833
+ * indicate the origin and nature of any modifications.
834
+ *
835
+ * I'd appreciate being given credit for this package in the documentation
836
+ * of software which uses it, but that is not a requirement.
837
+ *
838
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
839
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
840
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
841
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
842
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
843
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
844
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
845
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
846
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
847
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
848
+ *
849
+ * src/backend/regex/regfree.c
850
+ *
851
+ *
852
+ * You might think that this could be incorporated into regcomp.c, and
853
+ * that would be a reasonable idea... except that this is a generic
854
+ * function (with a generic name), applicable to all compiled REs
855
+ * regardless of the size of their characters, whereas the stuff in
856
+ * regcomp.c gets compiled once per character size.
857
+ */
858
+
859
+ ---
860
+
861
+ src/backend/utils/adt/inet_cidr_ntop.c
862
+
863
+ /*
864
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
865
+ * Copyright (c) 1996,1999 by Internet Software Consortium.
866
+ *
867
+ * Permission to use, copy, modify, and distribute this software for any
868
+ * purpose with or without fee is hereby granted, provided that the above
869
+ * copyright notice and this permission notice appear in all copies.
870
+ *
871
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
872
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
873
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
874
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
875
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
876
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
877
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
878
+ *
879
+ * src/backend/utils/adt/inet_cidr_ntop.c
880
+ */
881
+
882
+ ---
883
+
884
+ src/backend/utils/adt/inet_net_pton.c
885
+
886
+ /*
887
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
888
+ * Copyright (c) 1996,1999 by Internet Software Consortium.
889
+ *
890
+ * Permission to use, copy, modify, and distribute this software for any
891
+ * purpose with or without fee is hereby granted, provided that the above
892
+ * copyright notice and this permission notice appear in all copies.
893
+ *
894
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
895
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
896
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
897
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
898
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
899
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
900
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
901
+ *
902
+ * src/backend/utils/adt/inet_net_pton.c
903
+ */
904
+
905
+ ---
906
+
907
+ src/backend/utils/mb/wstrcmp.c
908
+
909
+ /*
910
+ * src/backend/utils/mb/wstrcmp.c
911
+ *
912
+ *-
913
+ * Copyright (c) 1990, 1993
914
+ * The Regents of the University of California. All rights reserved.
915
+ *
916
+ * This code is derived from software contributed to Berkeley by
917
+ * Chris Torek.
918
+ *
919
+ * Redistribution and use in source and binary forms, with or without
920
+ * modification, are permitted provided that the following conditions
921
+ * are met:
922
+ * 1. Redistributions of source code must retain the above copyright
923
+ * notice, this list of conditions and the following disclaimer.
924
+ * 2. Redistributions in binary form must reproduce the above copyright
925
+ * notice, this list of conditions and the following disclaimer in the
926
+ * documentation and/or other materials provided with the distribution.
927
+ * 3. Neither the name of the University nor the names of its contributors
928
+ * may be used to endorse or promote products derived from this software
929
+ * without specific prior written permission.
930
+ *
931
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
932
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
933
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
934
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
935
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
936
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
937
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
938
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
939
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
940
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
941
+ * SUCH DAMAGE.
942
+ */
943
+ /* can be used in either frontend or backend */
944
+
945
+ ---
946
+
947
+ src/backend/utils/mb/wstrncmp.c
948
+
949
+ /*
950
+ * src/backend/utils/mb/wstrncmp.c
951
+ *
952
+ *
953
+ * Copyright (c) 1989, 1993
954
+ * The Regents of the University of California. All rights reserved.
955
+ *
956
+ * This code is derived from FreeBSD 2.2.1-RELEASE software.
957
+ *
958
+ * Redistribution and use in source and binary forms, with or without
959
+ * modification, are permitted provided that the following conditions
960
+ * are met:
961
+ * 1. Redistributions of source code must retain the above copyright
962
+ * notice, this list of conditions and the following disclaimer.
963
+ * 2. Redistributions in binary form must reproduce the above copyright
964
+ * notice, this list of conditions and the following disclaimer in the
965
+ * documentation and/or other materials provided with the distribution.
966
+ * 3. Neither the name of the University nor the names of its contributors
967
+ * may be used to endorse or promote products derived from this software
968
+ * without specific prior written permission.
969
+ *
970
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
971
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
972
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
973
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
974
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
975
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
976
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
977
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
978
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
979
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
980
+ * SUCH DAMAGE.
981
+ */
982
+ /* can be used in either frontend or backend */
983
+
984
+ ---
985
+
986
+ src/common/md5.c
987
+
988
+ /*-------------------------------------------------------------------------
989
+ *
990
+ * md5.c
991
+ * Implements the MD5 Message-Digest Algorithm
992
+ *
993
+ * Fallback implementation of MD5, as specified in RFC 1321. This
994
+ * implementation is a simple one, in that it needs every input byte
995
+ * to be buffered before doing any calculations.
996
+ *
997
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
998
+ * Portions Copyright (c) 1994, Regents of the University of California
999
+ *
1000
+ * IDENTIFICATION
1001
+ * src/common/md5.c
1002
+ *
1003
+ *-------------------------------------------------------------------------
1004
+ */
1005
+
1006
+ /* $KAME: md5.c,v 1.3 2000/02/22 14:01:17 itojun Exp $ */
1007
+
1008
+ /*
1009
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
1010
+ * All rights reserved.
1011
+ *
1012
+ * Redistribution and use in source and binary forms, with or without
1013
+ * modification, are permitted provided that the following conditions
1014
+ * are met:
1015
+ * 1. Redistributions of source code must retain the above copyright
1016
+ * notice, this list of conditions and the following disclaimer.
1017
+ * 2. Redistributions in binary form must reproduce the above copyright
1018
+ * notice, this list of conditions and the following disclaimer in the
1019
+ * documentation and/or other materials provided with the distribution.
1020
+ * 3. Neither the name of the project nor the names of its contributors
1021
+ * may be used to endorse or promote products derived from this software
1022
+ * without specific prior written permission.
1023
+ *
1024
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
1025
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1026
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1027
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
1028
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1029
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1030
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1031
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1032
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1033
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1034
+ * SUCH DAMAGE.
1035
+ */
1036
+
1037
+ ---
1038
+
1039
+ src/common/md5_int.h
1040
+
1041
+ /*-------------------------------------------------------------------------
1042
+ *
1043
+ * md5_int.h
1044
+ * Internal headers for fallback implementation of MD5
1045
+ *
1046
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
1047
+ * Portions Copyright (c) 1994, Regents of the University of California
1048
+ *
1049
+ * IDENTIFICATION
1050
+ * src/common/md5_int.h
1051
+ *
1052
+ *-------------------------------------------------------------------------
1053
+ */
1054
+
1055
+ /* $KAME: md5.h,v 1.3 2000/02/22 14:01:18 itojun Exp $ */
1056
+
1057
+ /*
1058
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
1059
+ * All rights reserved.
1060
+ *
1061
+ * Redistribution and use in source and binary forms, with or without
1062
+ * modification, are permitted provided that the following conditions
1063
+ * are met:
1064
+ * 1. Redistributions of source code must retain the above copyright
1065
+ * notice, this list of conditions and the following disclaimer.
1066
+ * 2. Redistributions in binary form must reproduce the above copyright
1067
+ * notice, this list of conditions and the following disclaimer in the
1068
+ * documentation and/or other materials provided with the distribution.
1069
+ * 3. Neither the name of the project nor the names of its contributors
1070
+ * may be used to endorse or promote products derived from this software
1071
+ * without specific prior written permission.
1072
+ *
1073
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
1074
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1075
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1076
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
1077
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1078
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1079
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1080
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1081
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1082
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1083
+ * SUCH DAMAGE.
1084
+ */
1085
+
1086
+ ---
1087
+
1088
+ src/common/sha1.c
1089
+
1090
+ /*-------------------------------------------------------------------------
1091
+ *
1092
+ * sha1.c
1093
+ * Implements the SHA1 Secure Hash Algorithm
1094
+ *
1095
+ * Fallback implementation of SHA1, as specified in RFC 3174.
1096
+ *
1097
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
1098
+ * Portions Copyright (c) 1994, Regents of the University of California
1099
+ *
1100
+ * IDENTIFICATION
1101
+ * src/common/sha1.c
1102
+ *
1103
+ *-------------------------------------------------------------------------
1104
+ */
1105
+
1106
+ /* $KAME: sha1.c,v 1.3 2000/02/22 14:01:18 itojun Exp $ */
1107
+
1108
+ /*
1109
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
1110
+ * All rights reserved.
1111
+ *
1112
+ * Redistribution and use in source and binary forms, with or without
1113
+ * modification, are permitted provided that the following conditions
1114
+ * are met:
1115
+ * 1. Redistributions of source code must retain the above copyright
1116
+ * notice, this list of conditions and the following disclaimer.
1117
+ * 2. Redistributions in binary form must reproduce the above copyright
1118
+ * notice, this list of conditions and the following disclaimer in the
1119
+ * documentation and/or other materials provided with the distribution.
1120
+ * 3. Neither the name of the project nor the names of its contributors
1121
+ * may be used to endorse or promote products derived from this software
1122
+ * without specific prior written permission.
1123
+ *
1124
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
1125
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1126
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1127
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
1128
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1129
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1130
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1131
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1132
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1133
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1134
+ * SUCH DAMAGE.
1135
+ */
1136
+ /*
1137
+ * FIPS pub 180-1: Secure Hash Algorithm (SHA-1)
1138
+ * based on: http://www.itl.nist.gov/fipspubs/fip180-1.htm
1139
+ * implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
1140
+ */
1141
+
1142
+ ---
1143
+
1144
+ src/common/sha1_int.h
1145
+
1146
+ /*-------------------------------------------------------------------------
1147
+ *
1148
+ * sha1_int.h
1149
+ * Internal headers for fallback implementation of SHA1
1150
+ *
1151
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
1152
+ * Portions Copyright (c) 1994, Regents of the University of California
1153
+ *
1154
+ * IDENTIFICATION
1155
+ * src/common/sha1_int.h
1156
+ *
1157
+ *-------------------------------------------------------------------------
1158
+ */
1159
+
1160
+ /* $KAME: sha1.h,v 1.4 2000/02/22 14:01:18 itojun Exp $ */
1161
+
1162
+ /*
1163
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
1164
+ * All rights reserved.
1165
+ *
1166
+ * Redistribution and use in source and binary forms, with or without
1167
+ * modification, are permitted provided that the following conditions
1168
+ * are met:
1169
+ * 1. Redistributions of source code must retain the above copyright
1170
+ * notice, this list of conditions and the following disclaimer.
1171
+ * 2. Redistributions in binary form must reproduce the above copyright
1172
+ * notice, this list of conditions and the following disclaimer in the
1173
+ * documentation and/or other materials provided with the distribution.
1174
+ * 3. Neither the name of the project nor the names of its contributors
1175
+ * may be used to endorse or promote products derived from this software
1176
+ * without specific prior written permission.
1177
+ *
1178
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
1179
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1180
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1181
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
1182
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1183
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1184
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1185
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1186
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1187
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1188
+ * SUCH DAMAGE.
1189
+ */
1190
+ /*
1191
+ * FIPS pub 180-1: Secure Hash Algorithm (SHA-1)
1192
+ * based on: http://www.itl.nist.gov/fipspubs/fip180-1.htm
1193
+ * implemented by Jun-ichiro itojun Itoh <itojun@itojun.org>
1194
+ */
1195
+
1196
+ ---
1197
+
1198
+ src/common/sha2.c
1199
+
1200
+ /*-------------------------------------------------------------------------
1201
+ *
1202
+ * sha2.c
1203
+ * SHA functions for SHA-224, SHA-256, SHA-384 and SHA-512.
1204
+ *
1205
+ * This includes the fallback implementation for SHA2 cryptographic
1206
+ * hashes.
1207
+ *
1208
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
1209
+ * Portions Copyright (c) 1994, Regents of the University of California
1210
+ *
1211
+ * IDENTIFICATION
1212
+ * src/common/sha2.c
1213
+ *
1214
+ *-------------------------------------------------------------------------
1215
+ */
1216
+
1217
+ /* $OpenBSD: sha2.c,v 1.6 2004/05/03 02:57:36 millert Exp $ */
1218
+ /*
1219
+ * FILE: sha2.c
1220
+ * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
1221
+ *
1222
+ * Copyright (c) 2000-2001, Aaron D. Gifford
1223
+ * All rights reserved.
1224
+ *
1225
+ * Redistribution and use in source and binary forms, with or without
1226
+ * modification, are permitted provided that the following conditions
1227
+ * are met:
1228
+ * 1. Redistributions of source code must retain the above copyright
1229
+ * notice, this list of conditions and the following disclaimer.
1230
+ * 2. Redistributions in binary form must reproduce the above copyright
1231
+ * notice, this list of conditions and the following disclaimer in the
1232
+ * documentation and/or other materials provided with the distribution.
1233
+ * 3. Neither the name of the copyright holder nor the names of contributors
1234
+ * may be used to endorse or promote products derived from this software
1235
+ * without specific prior written permission.
1236
+ *
1237
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
1238
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1239
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1240
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
1241
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1242
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1243
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1244
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1245
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1246
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1247
+ * SUCH DAMAGE.
1248
+ *
1249
+ * $From: sha2.c,v 1.1 2001/11/08 00:01:51 adg Exp adg $
1250
+ */
1251
+
1252
+ ---
1253
+
1254
+ src/common/sha2_int.h
1255
+
1256
+ /*-------------------------------------------------------------------------
1257
+ *
1258
+ * sha2_int.h
1259
+ * Internal headers for fallback implementation of SHA{224,256,384,512}
1260
+ *
1261
+ * Portions Copyright (c) 2016-2025, PostgreSQL Global Development Group
1262
+ *
1263
+ * IDENTIFICATION
1264
+ * src/common/sha2_int.h
1265
+ *
1266
+ *-------------------------------------------------------------------------
1267
+ */
1268
+
1269
+ /* $OpenBSD: sha2.h,v 1.2 2004/04/28 23:11:57 millert Exp $ */
1270
+
1271
+ /*
1272
+ * FILE: sha2.h
1273
+ * AUTHOR: Aaron D. Gifford <me@aarongifford.com>
1274
+ *
1275
+ * Copyright (c) 2000-2001, Aaron D. Gifford
1276
+ * All rights reserved.
1277
+ *
1278
+ * Redistribution and use in source and binary forms, with or without
1279
+ * modification, are permitted provided that the following conditions
1280
+ * are met:
1281
+ * 1. Redistributions of source code must retain the above copyright
1282
+ * notice, this list of conditions and the following disclaimer.
1283
+ * 2. Redistributions in binary form must reproduce the above copyright
1284
+ * notice, this list of conditions and the following disclaimer in the
1285
+ * documentation and/or other materials provided with the distribution.
1286
+ * 3. Neither the name of the copyright holder nor the names of contributors
1287
+ * may be used to endorse or promote products derived from this software
1288
+ * without specific prior written permission.
1289
+ *
1290
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
1291
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1292
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1293
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTOR(S) BE LIABLE
1294
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1295
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1296
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1297
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1298
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1299
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1300
+ * SUCH DAMAGE.
1301
+ *
1302
+ * $From: sha2.h,v 1.1 2001/11/08 00:02:01 adg Exp adg $
1303
+ */
1304
+
1305
+ ---
1306
+
1307
+ src/include/common/hashfn_unstable.h
1308
+
1309
+ /* The MIT License
1310
+
1311
+ Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com)
1312
+
1313
+ Permission is hereby granted, free of charge, to any person
1314
+ obtaining a copy of this software and associated documentation
1315
+ files (the "Software"), to deal in the Software without
1316
+ restriction, including without limitation the rights to use, copy,
1317
+ modify, merge, publish, distribute, sublicense, and/or sell copies
1318
+ of the Software, and to permit persons to whom the Software is
1319
+ furnished to do so, subject to the following conditions:
1320
+
1321
+ The above copyright notice and this permission notice shall be
1322
+ included in all copies or substantial portions of the Software.
1323
+
1324
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1325
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1326
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1327
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
1328
+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
1329
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1330
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1331
+ SOFTWARE.
1332
+ */
1333
+
1334
+ ---
1335
+
1336
+ src/include/lib/hyperloglog.h
1337
+
1338
+ /*
1339
+ * hyperloglog.h
1340
+ *
1341
+ * A simple HyperLogLog cardinality estimator implementation
1342
+ *
1343
+ * Portions Copyright (c) 2014-2025, PostgreSQL Global Development Group
1344
+ *
1345
+ * Based on Hideaki Ohno's C++ implementation. The copyright terms of Ohno's
1346
+ * original version (the MIT license) follow.
1347
+ *
1348
+ * src/include/lib/hyperloglog.h
1349
+ */
1350
+
1351
+ /*
1352
+ * Copyright (c) 2013 Hideaki Ohno <hide.o.j55{at}gmail.com>
1353
+ *
1354
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
1355
+ * of this software and associated documentation files (the 'Software'), to
1356
+ * deal in the Software without restriction, including without limitation the
1357
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
1358
+ * sell copies of the Software, and to permit persons to whom the Software is
1359
+ * furnished to do so, subject to the following conditions:
1360
+ *
1361
+ * The above copyright notice and this permission notice shall be included in
1362
+ * all copies or substantial portions of the Software.
1363
+ *
1364
+ * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1365
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1366
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1367
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1368
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1369
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
1370
+ * IN THE SOFTWARE.
1371
+ */
1372
+
1373
+ ---
1374
+
1375
+ src/include/lib/sort_template.h
1376
+
1377
+ /*-------------------------------------------------------------------------
1378
+ *
1379
+ * sort_template.h
1380
+ *
1381
+ * A template for a sort algorithm that supports varying degrees of
1382
+ * specialization.
1383
+ *
1384
+ * Copyright (c) 2021-2025, PostgreSQL Global Development Group
1385
+ * Portions Copyright (c) 1992-1994, Regents of the University of California
1386
+ *
1387
+ * Usage notes:
1388
+ *
1389
+ * To generate functions specialized for a type, the following parameter
1390
+ * macros should be #define'd before this file is included.
1391
+ *
1392
+ * - ST_SORT - the name of a sort function to be generated
1393
+ * - ST_ELEMENT_TYPE - type of the referenced elements
1394
+ * - ST_DECLARE - if defined the functions and types are declared
1395
+ * - ST_DEFINE - if defined the functions and types are defined
1396
+ * - ST_SCOPE - scope (e.g. extern, static inline) for functions
1397
+ * - ST_CHECK_FOR_INTERRUPTS - if defined the sort is interruptible
1398
+ *
1399
+ * Instead of ST_ELEMENT_TYPE, ST_ELEMENT_TYPE_VOID can be defined. Then
1400
+ * the generated functions will automatically gain an "element_size"
1401
+ * parameter. This allows us to generate a traditional qsort function.
1402
+ *
1403
+ * One of the following macros must be defined, to show how to compare
1404
+ * elements. The first two options are arbitrary expressions depending
1405
+ * on whether an extra pass-through argument is desired, and the third
1406
+ * option should be defined if the sort function should receive a
1407
+ * function pointer at runtime.
1408
+ *
1409
+ * - ST_COMPARE(a, b) - a simple comparison expression
1410
+ * - ST_COMPARE(a, b, arg) - variant that takes an extra argument
1411
+ * - ST_COMPARE_RUNTIME_POINTER - sort function takes a function pointer
1412
+ *
1413
+ * NB: If the comparator function is inlined, some compilers may produce
1414
+ * worse code with the optimized comparison routines in common/int.h than
1415
+ * with code with the following form:
1416
+ *
1417
+ * if (a < b)
1418
+ * return -1;
1419
+ * if (a > b)
1420
+ * return 1;
1421
+ * return 0;
1422
+ *
1423
+ * To say that the comparator and therefore also sort function should
1424
+ * receive an extra pass-through argument, specify the type of the
1425
+ * argument.
1426
+ *
1427
+ * - ST_COMPARE_ARG_TYPE - type of extra argument
1428
+ *
1429
+ * The prototype of the generated sort function is:
1430
+ *
1431
+ * void ST_SORT(ST_ELEMENT_TYPE *data, size_t n,
1432
+ * [size_t element_size,]
1433
+ * [ST_SORT_compare_function compare,]
1434
+ * [ST_COMPARE_ARG_TYPE *arg]);
1435
+ *
1436
+ * ST_SORT_compare_function is a function pointer of the following type:
1437
+ *
1438
+ * int (*)(const ST_ELEMENT_TYPE *a, const ST_ELEMENT_TYPE *b,
1439
+ * [ST_COMPARE_ARG_TYPE *arg])
1440
+ *
1441
+ * HISTORY
1442
+ *
1443
+ * Modifications from vanilla NetBSD source:
1444
+ * - Add do ... while() macro fix
1445
+ * - Remove __inline, _DIAGASSERTs, __P
1446
+ * - Remove ill-considered "swap_cnt" switch to insertion sort, in favor
1447
+ * of a simple check for presorted input.
1448
+ * - Take care to recurse on the smaller partition, to bound stack usage
1449
+ * - Convert into a header that can generate specialized functions
1450
+ *
1451
+ * IDENTIFICATION
1452
+ * src/include/lib/sort_template.h
1453
+ *
1454
+ *-------------------------------------------------------------------------
1455
+ */
1456
+
1457
+ /* $NetBSD: qsort.c,v 1.13 2003/08/07 16:43:42 agc Exp $ */
1458
+
1459
+ /*-
1460
+ * Copyright (c) 1992, 1993
1461
+ * The Regents of the University of California. All rights reserved.
1462
+ *
1463
+ * Redistribution and use in source and binary forms, with or without
1464
+ * modification, are permitted provided that the following conditions
1465
+ * are met:
1466
+ * 1. Redistributions of source code must retain the above copyright
1467
+ * notice, this list of conditions and the following disclaimer.
1468
+ * 2. Redistributions in binary form must reproduce the above copyright
1469
+ * notice, this list of conditions and the following disclaimer in the
1470
+ * documentation and/or other materials provided with the distribution.
1471
+ * 3. Neither the name of the University nor the names of its contributors
1472
+ * may be used to endorse or promote products derived from this software
1473
+ * without specific prior written permission.
1474
+ *
1475
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1476
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1477
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1478
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1479
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1480
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1481
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1482
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1483
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1484
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1485
+ * SUCH DAMAGE.
1486
+ */
1487
+
1488
+ /*
1489
+ * Qsort routine based on J. L. Bentley and M. D. McIlroy,
1490
+ * "Engineering a sort function",
1491
+ * Software--Practice and Experience 23 (1993) 1249-1265.
1492
+ *
1493
+ * We have modified their original by adding a check for already-sorted
1494
+ * input, which seems to be a win per discussions on pgsql-hackers around
1495
+ * 2006-03-21.
1496
+ *
1497
+ * Also, we recurse on the smaller partition and iterate on the larger one,
1498
+ * which ensures we cannot recurse more than log(N) levels (since the
1499
+ * partition recursed to is surely no more than half of the input). Bentley
1500
+ * and McIlroy explicitly rejected doing this on the grounds that it's "not
1501
+ * worth the effort", but we have seen crashes in the field due to stack
1502
+ * overrun, so that judgment seems wrong.
1503
+ */
1504
+
1505
+ ---
1506
+
1507
+ src/include/regex/regcustom.h
1508
+
1509
+ /*
1510
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
1511
+ *
1512
+ * Development of this software was funded, in part, by Cray Research Inc.,
1513
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
1514
+ * Corporation, none of whom are responsible for the results. The author
1515
+ * thanks all of them.
1516
+ *
1517
+ * Redistribution and use in source and binary forms -- with or without
1518
+ * modification -- are permitted for any purpose, provided that
1519
+ * redistributions in source form retain this entire copyright notice and
1520
+ * indicate the origin and nature of any modifications.
1521
+ *
1522
+ * I'd appreciate being given credit for this package in the documentation
1523
+ * of software which uses it, but that is not a requirement.
1524
+ *
1525
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
1526
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
1527
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
1528
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1529
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1530
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
1531
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1532
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1533
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1534
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1535
+ *
1536
+ * src/include/regex/regcustom.h
1537
+ */
1538
+
1539
+ /* headers if any */
1540
+
1541
+ /*
1542
+ * It's against Postgres coding conventions to include postgres.h in a
1543
+ * header file, but we allow the violation here because the regexp library
1544
+ * files specifically intend this file to supply application-dependent
1545
+ * headers, and are careful to include this file before anything else.
1546
+ */
1547
+
1548
+ ---
1549
+
1550
+ src/include/regex/regex.h
1551
+
1552
+ /*
1553
+ * regular expressions
1554
+ *
1555
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
1556
+ *
1557
+ * Development of this software was funded, in part, by Cray Research Inc.,
1558
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
1559
+ * Corporation, none of whom are responsible for the results. The author
1560
+ * thanks all of them.
1561
+ *
1562
+ * Redistribution and use in source and binary forms -- with or without
1563
+ * modification -- are permitted for any purpose, provided that
1564
+ * redistributions in source form retain this entire copyright notice and
1565
+ * indicate the origin and nature of any modifications.
1566
+ *
1567
+ * I'd appreciate being given credit for this package in the documentation
1568
+ * of software which uses it, but that is not a requirement.
1569
+ *
1570
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
1571
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
1572
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
1573
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1574
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1575
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
1576
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1577
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1578
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1579
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1580
+ *
1581
+ * src/include/regex/regex.h
1582
+ */
1583
+
1584
+ ---
1585
+
1586
+ src/include/regex/regguts.h
1587
+
1588
+ /*
1589
+ * Internal interface definitions, etc., for the reg package
1590
+ *
1591
+ * Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
1592
+ *
1593
+ * Development of this software was funded, in part, by Cray Research Inc.,
1594
+ * UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
1595
+ * Corporation, none of whom are responsible for the results. The author
1596
+ * thanks all of them.
1597
+ *
1598
+ * Redistribution and use in source and binary forms -- with or without
1599
+ * modification -- are permitted for any purpose, provided that
1600
+ * redistributions in source form retain this entire copyright notice and
1601
+ * indicate the origin and nature of any modifications.
1602
+ *
1603
+ * I'd appreciate being given credit for this package in the documentation
1604
+ * of software which uses it, but that is not a requirement.
1605
+ *
1606
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
1607
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
1608
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
1609
+ * HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
1610
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1611
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
1612
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
1613
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
1614
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
1615
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1616
+ *
1617
+ * src/include/regex/regguts.h
1618
+ */
1619
+
1620
+
1621
+
1622
+ /*
1623
+ * Environmental customization. It should not (I hope) be necessary to
1624
+ * alter the file you are now reading -- regcustom.h should handle it all,
1625
+ * given care here and elsewhere.
1626
+ */
1627
+
1628
+ ---
1629
+
1630
+ src/port/bsearch_arg.c
1631
+
1632
+ /*
1633
+ * bsearch_arg.c: bsearch variant with a user-supplied pointer
1634
+ *
1635
+ * Copyright (c) 2021-2025, PostgreSQL Global Development Group
1636
+ * Copyright (c) 1990 Regents of the University of California.
1637
+ * All rights reserved.
1638
+ *
1639
+ * Redistribution and use in source and binary forms, with or without
1640
+ * modification, are permitted provided that the following conditions
1641
+ * are met:
1642
+ * 1. Redistributions of source code must retain the above copyright
1643
+ * notice, this list of conditions and the following disclaimer.
1644
+ * 2. Redistributions in binary form must reproduce the above copyright
1645
+ * notice, this list of conditions and the following disclaimer in the
1646
+ * documentation and/or other materials provided with the distribution.
1647
+ * 3. [rescinded 22 July 1999]
1648
+ * 4. Neither the name of the University nor the names of its contributors
1649
+ * may be used to endorse or promote products derived from this software
1650
+ * without specific prior written permission.
1651
+ *
1652
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1653
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1654
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1655
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1656
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1657
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1658
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1659
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1660
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1661
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1662
+ * SUCH DAMAGE.
1663
+ *
1664
+ * src/port/bsearch_arg.c
1665
+ */
1666
+
1667
+ ---
1668
+
1669
+ src/port/getopt.c
1670
+
1671
+ /* src/port/getopt.c */
1672
+
1673
+ /*
1674
+ * Copyright (c) 1987, 1993, 1994
1675
+ * The Regents of the University of California. All rights reserved.
1676
+ *
1677
+ * Redistribution and use in source and binary forms, with or without
1678
+ * modification, are permitted provided that the following conditions
1679
+ * are met:
1680
+ * 1. Redistributions of source code must retain the above copyright
1681
+ * notice, this list of conditions and the following disclaimer.
1682
+ * 2. Redistributions in binary form must reproduce the above copyright
1683
+ * notice, this list of conditions and the following disclaimer in the
1684
+ * documentation and/or other materials provided with the distribution.
1685
+ * 3. Neither the name of the University nor the names of its contributors
1686
+ * may be used to endorse or promote products derived from this software
1687
+ * without specific prior written permission.
1688
+ *
1689
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1690
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1691
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1692
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1693
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1694
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1695
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1696
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1697
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1698
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1699
+ * SUCH DAMAGE.
1700
+ */
1701
+
1702
+ ---
1703
+
1704
+ src/port/getopt_long.c
1705
+
1706
+ /*
1707
+ * getopt_long() -- long options parser
1708
+ *
1709
+ * Portions Copyright (c) 1987, 1993, 1994
1710
+ * The Regents of the University of California. All rights reserved.
1711
+ *
1712
+ * Portions Copyright (c) 2003
1713
+ * PostgreSQL Global Development Group
1714
+ *
1715
+ * Redistribution and use in source and binary forms, with or without
1716
+ * modification, are permitted provided that the following conditions
1717
+ * are met:
1718
+ * 1. Redistributions of source code must retain the above copyright
1719
+ * notice, this list of conditions and the following disclaimer.
1720
+ * 2. Redistributions in binary form must reproduce the above copyright
1721
+ * notice, this list of conditions and the following disclaimer in the
1722
+ * documentation and/or other materials provided with the distribution.
1723
+ * 3. Neither the name of the University nor the names of its contributors
1724
+ * may be used to endorse or promote products derived from this software
1725
+ * without specific prior written permission.
1726
+ *
1727
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1728
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1729
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1730
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1731
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1732
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1733
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1734
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1735
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1736
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1737
+ * SUCH DAMAGE.
1738
+ *
1739
+ * src/port/getopt_long.c
1740
+ */
1741
+
1742
+ ---
1743
+
1744
+ src/port/inet_aton.c
1745
+
1746
+ /* src/port/inet_aton.c
1747
+ *
1748
+ * This inet_aton() function was taken from the GNU C library and
1749
+ * incorporated into Postgres for those systems which do not have this
1750
+ * routine in their standard C libraries.
1751
+ *
1752
+ * The function was been extracted whole from the file inet_aton.c in
1753
+ * Release 5.3.12 of the Linux C library, which is derived from the
1754
+ * GNU C library, by Bryan Henderson in October 1996. The copyright
1755
+ * notice from that file is below.
1756
+ */
1757
+
1758
+ /*
1759
+ * Copyright (c) 1983, 1990, 1993
1760
+ * The Regents of the University of California. All rights reserved.
1761
+ *
1762
+ * Redistribution and use in source and binary forms, with or without
1763
+ * modification, are permitted provided that the following conditions
1764
+ * are met:
1765
+ * 1. Redistributions of source code must retain the above copyright
1766
+ * notice, this list of conditions and the following disclaimer.
1767
+ * 2. Redistributions in binary form must reproduce the above copyright
1768
+ * notice, this list of conditions and the following disclaimer in the
1769
+ * documentation and/or other materials provided with the distribution.
1770
+ * 3. Neither the name of the University nor the names of its contributors
1771
+ * may be used to endorse or promote products derived from this software
1772
+ * without specific prior written permission.
1773
+ *
1774
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1775
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1776
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1777
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1778
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1779
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1780
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1781
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1782
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1783
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1784
+ * SUCH DAMAGE. */
1785
+
1786
+ ---
1787
+
1788
+ src/port/inet_net_ntop.c
1789
+
1790
+ /*
1791
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
1792
+ * Copyright (c) 1996,1999 by Internet Software Consortium.
1793
+ *
1794
+ * Permission to use, copy, modify, and distribute this software for any
1795
+ * purpose with or without fee is hereby granted, provided that the above
1796
+ * copyright notice and this permission notice appear in all copies.
1797
+ *
1798
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
1799
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1800
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
1801
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1802
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1803
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1804
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1805
+ *
1806
+ * src/port/inet_net_ntop.c
1807
+ */
1808
+
1809
+ ---
1810
+
1811
+ src/port/mkdtemp.c
1812
+
1813
+ /*
1814
+ * Copyright (c) 1987, 1993
1815
+ * The Regents of the University of California. All rights reserved.
1816
+ *
1817
+ * Redistribution and use in source and binary forms, with or without
1818
+ * modification, are permitted provided that the following conditions
1819
+ * are met:
1820
+ * 1. Redistributions of source code must retain the above copyright
1821
+ * notice, this list of conditions and the following disclaimer.
1822
+ * 2. Redistributions in binary form must reproduce the above copyright
1823
+ * notice, this list of conditions and the following disclaimer in the
1824
+ * documentation and/or other materials provided with the distribution.
1825
+ * 3. Neither the name of the University nor the names of its contributors
1826
+ * may be used to endorse or promote products derived from this software
1827
+ * without specific prior written permission.
1828
+ *
1829
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1830
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1831
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1832
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1833
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1834
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1835
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1836
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1837
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1838
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1839
+ * SUCH DAMAGE.
1840
+ */
1841
+
1842
+ ---
1843
+
1844
+ src/port/mkdtemp.c
1845
+
1846
+ /*
1847
+ * Copyright (c) 1987, 1993
1848
+ * The Regents of the University of California. All rights reserved.
1849
+ *
1850
+ * Redistribution and use in source and binary forms, with or without
1851
+ * modification, are permitted provided that the following conditions
1852
+ * are met:
1853
+ * 1. Redistributions of source code must retain the above copyright
1854
+ * notice, this list of conditions and the following disclaimer.
1855
+ * 2. Redistributions in binary form must reproduce the above copyright
1856
+ * notice, this list of conditions and the following disclaimer in the
1857
+ * documentation and/or other materials provided with the distribution.
1858
+ * 3. Neither the name of the University nor the names of its contributors
1859
+ * may be used to endorse or promote products derived from this software
1860
+ * without specific prior written permission.
1861
+ *
1862
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1863
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1864
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1865
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1866
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1867
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1868
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1869
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1870
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1871
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1872
+ * SUCH DAMAGE.
1873
+ */
1874
+
1875
+ ---
1876
+
1877
+ src/port/pgmkdirp.c
1878
+
1879
+ /*
1880
+ * This is adapted from FreeBSD's src/bin/mkdir/mkdir.c, which bears
1881
+ * the following copyright notice:
1882
+ *
1883
+ * Copyright (c) 1983, 1992, 1993
1884
+ * The Regents of the University of California. All rights reserved.
1885
+ *
1886
+ * Redistribution and use in source and binary forms, with or without
1887
+ * modification, are permitted provided that the following conditions
1888
+ * are met:
1889
+ * 1. Redistributions of source code must retain the above copyright
1890
+ * notice, this list of conditions and the following disclaimer.
1891
+ * 2. Redistributions in binary form must reproduce the above copyright
1892
+ * notice, this list of conditions and the following disclaimer in the
1893
+ * documentation and/or other materials provided with the distribution.
1894
+ * 4. Neither the name of the University nor the names of its contributors
1895
+ * may be used to endorse or promote products derived from this software
1896
+ * without specific prior written permission.
1897
+ *
1898
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1899
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1900
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1901
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1902
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1903
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1904
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1905
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1906
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1907
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1908
+ * SUCH DAMAGE.
1909
+ */
1910
+
1911
+ ---
1912
+
1913
+ src/port/snprintf.c
1914
+
1915
+ /*
1916
+ * Copyright (c) 1983, 1995, 1996 Eric P. Allman
1917
+ * Copyright (c) 1988, 1993
1918
+ * The Regents of the University of California. All rights reserved.
1919
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
1920
+ *
1921
+ * Redistribution and use in source and binary forms, with or without
1922
+ * modification, are permitted provided that the following conditions
1923
+ * are met:
1924
+ * 1. Redistributions of source code must retain the above copyright
1925
+ * notice, this list of conditions and the following disclaimer.
1926
+ * 2. Redistributions in binary form must reproduce the above copyright
1927
+ * notice, this list of conditions and the following disclaimer in the
1928
+ * documentation and/or other materials provided with the distribution.
1929
+ * 3. Neither the name of the University nor the names of its contributors
1930
+ * may be used to endorse or promote products derived from this software
1931
+ * without specific prior written permission.
1932
+ *
1933
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1934
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1935
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1936
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1937
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1938
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1939
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
1940
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
1941
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
1942
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
1943
+ * SUCH DAMAGE.
1944
+ *
1945
+ * src/port/snprintf.c
1946
+ */
1947
+
1948
+ ---
1949
+
1950
+ src/port/strlcat.c
1951
+
1952
+ /*
1953
+ * src/port/strlcat.c
1954
+ *
1955
+ * $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
1956
+
1957
+ /*
1958
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
1959
+ *
1960
+ * Permission to use, copy, modify, and distribute this software for any
1961
+ * purpose with or without fee is hereby granted, provided that the above
1962
+ * copyright notice and this permission notice appear in all copies.
1963
+ *
1964
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1965
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1966
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1967
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1968
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1969
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1970
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1971
+ */
1972
+
1973
+ ---
1974
+
1975
+ src/port/strlcpy.c
1976
+
1977
+ /*-------------------------------------------------------------------------
1978
+ *
1979
+ * strlcpy.c
1980
+ * strncpy done right
1981
+ *
1982
+ * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
1983
+ *
1984
+ *
1985
+ * IDENTIFICATION
1986
+ * src/port/strlcpy.c
1987
+ *
1988
+ * This file was taken from OpenBSD and is used on platforms that don't
1989
+ * provide strlcpy(). The OpenBSD copyright terms follow.
1990
+ *-------------------------------------------------------------------------
1991
+ */
1992
+
1993
+ /* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
1994
+
1995
+ /*
1996
+ * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
1997
+ *
1998
+ * Permission to use, copy, modify, and distribute this software for any
1999
+ * purpose with or without fee is hereby granted, provided that the above
2000
+ * copyright notice and this permission notice appear in all copies.
2001
+ *
2002
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2003
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2004
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2005
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2006
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2007
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2008
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2009
+ */
2010
+
2011
+ ---
2012
+
2013
+ src/port/strsep.c
2014
+
2015
+ /*
2016
+ * src/port/strsep.c
2017
+ *
2018
+ * $OpenBSD: strsep.c,v 1.8 2015/08/31 02:53:57 guenther Exp $ */
2019
+
2020
+ /*-
2021
+ * Copyright (c) 1990, 1993
2022
+ * The Regents of the University of California. All rights reserved.
2023
+ *
2024
+ * Redistribution and use in source and binary forms, with or without
2025
+ * modification, are permitted provided that the following conditions
2026
+ * are met:
2027
+ * 1. Redistributions of source code must retain the above copyright
2028
+ * notice, this list of conditions and the following disclaimer.
2029
+ * 2. Redistributions in binary form must reproduce the above copyright
2030
+ * notice, this list of conditions and the following disclaimer in the
2031
+ * documentation and/or other materials provided with the distribution.
2032
+ * 3. Neither the name of the University nor the names of its contributors
2033
+ * may be used to endorse or promote products derived from this software
2034
+ * without specific prior written permission.
2035
+ *
2036
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2037
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2038
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2039
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2040
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2041
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2042
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2043
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2044
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2045
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2046
+ * SUCH DAMAGE.
2047
+ */
2048
+
2049
+ ---
2050
+
2051
+ src/port/timingsafe_bcmp.c
2052
+
2053
+ /*
2054
+ * src/port/timingsafe_bcmp.c
2055
+ *
2056
+ * $OpenBSD: timingsafe_bcmp.c,v 1.3 2015/08/31 02:53:57 guenther Exp $
2057
+ */
2058
+
2059
+ /*
2060
+ * Copyright (c) 2010 Damien Miller. All rights reserved.
2061
+ *
2062
+ * Permission to use, copy, modify, and distribute this software for any
2063
+ * purpose with or without fee is hereby granted, provided that the above
2064
+ * copyright notice and this permission notice appear in all copies.
2065
+ *
2066
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2067
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2068
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2069
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2070
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2071
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2072
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2073
+ */
2074
+
2075
+ ---
2076
+
2077
+ src/port/win32gettimeofday.c
2078
+
2079
+ /*
2080
+ * win32gettimeofday.c
2081
+ * Win32 gettimeofday() replacement
2082
+ *
2083
+ * src/port/win32gettimeofday.c
2084
+ *
2085
+ * Copyright (c) 2003 SRA, Inc.
2086
+ * Copyright (c) 2003 SKC, Inc.
2087
+ *
2088
+ * Permission to use, copy, modify, and distribute this software and
2089
+ * its documentation for any purpose, without fee, and without a
2090
+ * written agreement is hereby granted, provided that the above
2091
+ * copyright notice and this paragraph and the following two
2092
+ * paragraphs appear in all copies.
2093
+ *
2094
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
2095
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
2096
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
2097
+ * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
2098
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
2099
+ *
2100
+ * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
2101
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2102
+ * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
2103
+ * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
2104
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2105
+ */
2106
+
2107
+ ---
2108
+
2109
+ src/timezone/strftime.c
2110
+
2111
+ /* Convert a broken-down timestamp to a string. */
2112
+
2113
+ /*
2114
+ * Copyright 1989 The Regents of the University of California.
2115
+ * All rights reserved.
2116
+ *
2117
+ * Redistribution and use in source and binary forms, with or without
2118
+ * modification, are permitted provided that the following conditions
2119
+ * are met:
2120
+ * 1. Redistributions of source code must retain the above copyright
2121
+ * notice, this list of conditions and the following disclaimer.
2122
+ * 2. Redistributions in binary form must reproduce the above copyright
2123
+ * notice, this list of conditions and the following disclaimer in the
2124
+ * documentation and/or other materials provided with the distribution.
2125
+ * 3. Neither the name of the University nor the names of its contributors
2126
+ * may be used to endorse or promote products derived from this software
2127
+ * without specific prior written permission.
2128
+ *
2129
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND
2130
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2131
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2132
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2133
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2134
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2135
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2136
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2137
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2138
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2139
+ * SUCH DAMAGE.
2140
+ */
2141
+
2142
+ /*
2143
+ * Based on the UCB version with the copyright notice appearing above.
2144
+ *
2145
+ * This is ANSIish only when "multibyte character == plain character".
2146
+ *
2147
+ * IDENTIFICATION
2148
+ * src/timezone/strftime.c
2149
+ */
2150
+
2151
+ ---
2152
+
2153
+ contrib/dblink/dblink.c
2154
+
2155
+ /*
2156
+ * dblink.c
2157
+ *
2158
+ * Functions returning results from a remote database
2159
+ *
2160
+ * Joe Conway <mail@joeconway.com>
2161
+ * And contributors:
2162
+ * Darko Prenosil <Darko.Prenosil@finteh.hr>
2163
+ * Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
2164
+ *
2165
+ * contrib/dblink/dblink.c
2166
+ * Copyright (c) 2001-2025, PostgreSQL Global Development Group
2167
+ * ALL RIGHTS RESERVED;
2168
+ *
2169
+ * Permission to use, copy, modify, and distribute this software and its
2170
+ * documentation for any purpose, without fee, and without a written agreement
2171
+ * is hereby granted, provided that the above copyright notice and this
2172
+ * paragraph and the following two paragraphs appear in all copies.
2173
+ *
2174
+ * IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
2175
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
2176
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
2177
+ * DOCUMENTATION, EVEN IF THE AUTHOR OR DISTRIBUTORS HAVE BEEN ADVISED OF THE
2178
+ * POSSIBILITY OF SUCH DAMAGE.
2179
+ *
2180
+ * THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIMS ANY WARRANTIES,
2181
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
2182
+ * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
2183
+ * ON AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAS NO OBLIGATIONS TO
2184
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2185
+ *
2186
+ */
2187
+
2188
+ ---
2189
+
2190
+ contrib/fuzzystrmatch/dmetaphone.c
2191
+
2192
+ /*
2193
+ * This is a port of the Double Metaphone algorithm for use in PostgreSQL.
2194
+ *
2195
+ * contrib/fuzzystrmatch/dmetaphone.c
2196
+ *
2197
+ * Double Metaphone computes 2 "sounds like" strings - a primary and an
2198
+ * alternate. In most cases they are the same, but for foreign names
2199
+ * especially they can be a bit different, depending on pronunciation.
2200
+ *
2201
+ * Information on using Double Metaphone can be found at
2202
+ * http://www.codeproject.com/string/dmetaphone1.asp
2203
+ * and the original article describing it can be found at
2204
+ * http://drdobbs.com/184401251
2205
+ *
2206
+ * For PostgreSQL we provide 2 functions - one for the primary and one for
2207
+ * the alternate. That way the functions are pure text->text mappings that
2208
+ * are useful in functional indexes. These are 'dmetaphone' for the
2209
+ * primary and 'dmetaphone_alt' for the alternate.
2210
+ *
2211
+ * Assuming that dmetaphone.so is in $libdir, the SQL to set up the
2212
+ * functions looks like this:
2213
+ *
2214
+ * CREATE FUNCTION dmetaphone (text) RETURNS text
2215
+ * LANGUAGE C IMMUTABLE STRICT
2216
+ * AS '$libdir/dmetaphone', 'dmetaphone';
2217
+ *
2218
+ * CREATE FUNCTION dmetaphone_alt (text) RETURNS text
2219
+ * LANGUAGE C IMMUTABLE STRICT
2220
+ * AS '$libdir/dmetaphone', 'dmetaphone_alt';
2221
+ *
2222
+ * Note that you have to declare the functions IMMUTABLE if you want to
2223
+ * use them in functional indexes, and you have to declare them as STRICT
2224
+ * as they do not check for NULL input, and will segfault if given NULL input.
2225
+ * (See below for alternative ) Declaring them as STRICT means PostgreSQL
2226
+ * will never call them with NULL, but instead assume the result is NULL,
2227
+ * which is what we (I) want.
2228
+ *
2229
+ * Alternatively, compile with -DDMETAPHONE_NOSTRICT and the functions
2230
+ * will detect NULL input and return NULL. The you don't have to declare them
2231
+ * as STRICT.
2232
+ *
2233
+ * There is a small inefficiency here - each function call actually computes
2234
+ * both the primary and the alternate and then throws away the one it doesn't
2235
+ * need. That's the way the perl module was written, because perl can handle
2236
+ * a list return more easily than we can in PostgreSQL. The result has been
2237
+ * fast enough for my needs, but it could maybe be optimized a bit to remove
2238
+ * that behaviour.
2239
+ *
2240
+ */
2241
+
2242
+
2243
+ /***************************** COPYRIGHT NOTICES ***********************
2244
+
2245
+ Most of this code is directly from the Text::DoubleMetaphone perl module
2246
+ version 0.05 available from https://www.cpan.org/.
2247
+ It bears this copyright notice:
2248
+
2249
+
2250
+ Copyright 2000, Maurice Aubrey <maurice@hevanet.com>.
2251
+ All rights reserved.
2252
+
2253
+ This code is based heavily on the C++ implementation by
2254
+ Lawrence Philips and incorporates several bug fixes courtesy
2255
+ of Kevin Atkinson <kevina@users.sourceforge.net>.
2256
+
2257
+ This module is free software; you may redistribute it and/or
2258
+ modify it under the same terms as Perl itself.
2259
+
2260
+ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
2261
+ <andrew@dunslane.net> and is covered this copyright:
2262
+
2263
+ Copyright 2003, North Carolina State Highway Patrol.
2264
+ All rights reserved.
2265
+
2266
+ Permission to use, copy, modify, and distribute this software and its
2267
+ documentation for any purpose, without fee, and without a written agreement
2268
+ is hereby granted, provided that the above copyright notice and this
2269
+ paragraph and the following two paragraphs appear in all copies.
2270
+
2271
+ IN NO EVENT SHALL THE NORTH CAROLINA STATE HIGHWAY PATROL BE LIABLE TO ANY
2272
+ PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
2273
+ INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
2274
+ DOCUMENTATION, EVEN IF THE NORTH CAROLINA STATE HIGHWAY PATROL HAS BEEN
2275
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2276
+
2277
+ THE NORTH CAROLINA STATE HIGHWAY PATROL SPECIFICALLY DISCLAIMS ANY
2278
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2279
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED
2280
+ HEREUNDER IS ON AN "AS IS" BASIS, AND THE NORTH CAROLINA STATE HIGHWAY PATROL
2281
+ HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
2282
+ MODIFICATIONS.
2283
+
2284
+ ***********************************************************************/
2285
+
2286
+
2287
+ /* include these first, according to the docs */
2288
+
2289
+ ---
2290
+
2291
+ contrib/fuzzystrmatch/fuzzystrmatch.c
2292
+
2293
+ /*
2294
+ * fuzzystrmatch.c
2295
+ *
2296
+ * Functions for "fuzzy" comparison of strings
2297
+ *
2298
+ * Joe Conway <mail@joeconway.com>
2299
+ *
2300
+ * contrib/fuzzystrmatch/fuzzystrmatch.c
2301
+ * Copyright (c) 2001-2025, PostgreSQL Global Development Group
2302
+ * ALL RIGHTS RESERVED;
2303
+ *
2304
+ * metaphone()
2305
+ * -----------
2306
+ * Modified for PostgreSQL by Joe Conway.
2307
+ * Based on CPAN's "Text-Metaphone-1.96" by Michael G Schwern <schwern@pobox.com>
2308
+ * Code slightly modified for use as PostgreSQL function (palloc, elog, etc).
2309
+ * Metaphone was originally created by Lawrence Philips and presented in article
2310
+ * in "Computer Language" December 1990 issue.
2311
+ *
2312
+ * Permission to use, copy, modify, and distribute this software and its
2313
+ * documentation for any purpose, without fee, and without a written agreement
2314
+ * is hereby granted, provided that the above copyright notice and this
2315
+ * paragraph and the following two paragraphs appear in all copies.
2316
+ *
2317
+ * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
2318
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
2319
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
2320
+ * DOCUMENTATION, EVEN IF THE AUTHOR OR DISTRIBUTORS HAVE BEEN ADVISED OF THE
2321
+ * POSSIBILITY OF SUCH DAMAGE.
2322
+ *
2323
+ * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
2324
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
2325
+ * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
2326
+ * ON AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAS NO OBLIGATIONS TO
2327
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2328
+ *
2329
+ */
2330
+
2331
+ ---
2332
+
2333
+ contrib/pageinspect/btreefuncs.c
2334
+
2335
+ /*
2336
+ * contrib/pageinspect/btreefuncs.c
2337
+ *
2338
+ *
2339
+ * btreefuncs.c
2340
+ *
2341
+ * Copyright (c) 2006 Satoshi Nagayasu <nagayasus@nttdata.co.jp>
2342
+ *
2343
+ * Permission to use, copy, modify, and distribute this software and
2344
+ * its documentation for any purpose, without fee, and without a
2345
+ * written agreement is hereby granted, provided that the above
2346
+ * copyright notice and this paragraph and the following two
2347
+ * paragraphs appear in all copies.
2348
+ *
2349
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
2350
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
2351
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
2352
+ * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
2353
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
2354
+ *
2355
+ * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
2356
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2357
+ * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
2358
+ * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
2359
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
2360
+ */
2361
+
2362
+ ---
2363
+
2364
+ contrib/pgcrypto/crypt-des.c
2365
+
2366
+ /*
2367
+ * FreeSec: libcrypt for NetBSD
2368
+ *
2369
+ * contrib/pgcrypto/crypt-des.c
2370
+ *
2371
+ * Copyright (c) 1994 David Burren
2372
+ * All rights reserved.
2373
+ *
2374
+ * Adapted for FreeBSD-2.0 by Geoffrey M. Rehmet
2375
+ * this file should now *only* export crypt(), in order to make
2376
+ * binaries of libcrypt exportable from the USA
2377
+ *
2378
+ * Adapted for FreeBSD-4.0 by Mark R V Murray
2379
+ * this file should now *only* export px_crypt_des(), in order to make
2380
+ * a module that can be optionally included in libcrypt.
2381
+ *
2382
+ * Redistribution and use in source and binary forms, with or without
2383
+ * modification, are permitted provided that the following conditions
2384
+ * are met:
2385
+ * 1. Redistributions of source code must retain the above copyright
2386
+ * notice, this list of conditions and the following disclaimer.
2387
+ * 2. Redistributions in binary form must reproduce the above copyright
2388
+ * notice, this list of conditions and the following disclaimer in the
2389
+ * documentation and/or other materials provided with the distribution.
2390
+ * 3. Neither the name of the author nor the names of other contributors
2391
+ * may be used to endorse or promote products derived from this software
2392
+ * without specific prior written permission.
2393
+ *
2394
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2395
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2396
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2397
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2398
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2399
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2400
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2401
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2402
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2403
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2404
+ * SUCH DAMAGE.
2405
+ *
2406
+ * $FreeBSD: src/secure/lib/libcrypt/crypt-des.c,v 1.12 1999/09/20 12:39:20 markm Exp $
2407
+ *
2408
+ * This is an original implementation of the DES and the crypt(3) interfaces
2409
+ * by David Burren <davidb@werj.com.au>.
2410
+ *
2411
+ * An excellent reference on the underlying algorithm (and related
2412
+ * algorithms) is:
2413
+ *
2414
+ * B. Schneier, Applied Cryptography: protocols, algorithms,
2415
+ * and source code in C, John Wiley & Sons, 1994.
2416
+ *
2417
+ * Note that in that book's description of DES the lookups for the initial,
2418
+ * pbox, and final permutations are inverted (this has been brought to the
2419
+ * attention of the author). A list of errata for this book has been
2420
+ * posted to the sci.crypt newsgroup by the author and is available for FTP.
2421
+ *
2422
+ * ARCHITECTURE ASSUMPTIONS:
2423
+ * It is assumed that the 8-byte arrays passed by reference can be
2424
+ * addressed as arrays of uint32's (ie. the CPU is not picky about
2425
+ * alignment).
2426
+ */
2427
+
2428
+ ---
2429
+
2430
+ contrib/pgcrypto/mbuf.c
2431
+
2432
+ /*
2433
+ * mbuf.c
2434
+ * Memory buffer operations.
2435
+ *
2436
+ * Copyright (c) 2005 Marko Kreen
2437
+ * All rights reserved.
2438
+ *
2439
+ * Redistribution and use in source and binary forms, with or without
2440
+ * modification, are permitted provided that the following conditions
2441
+ * are met:
2442
+ * 1. Redistributions of source code must retain the above copyright
2443
+ * notice, this list of conditions and the following disclaimer.
2444
+ * 2. Redistributions in binary form must reproduce the above copyright
2445
+ * notice, this list of conditions and the following disclaimer in the
2446
+ * documentation and/or other materials provided with the distribution.
2447
+ *
2448
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2449
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2450
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2451
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2452
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2453
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2454
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2455
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2456
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2457
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2458
+ * SUCH DAMAGE.
2459
+ *
2460
+ * contrib/pgcrypto/mbuf.c
2461
+ */
2462
+
2463
+ ---
2464
+
2465
+ contrib/pgcrypto/mbuf.h
2466
+
2467
+ /*
2468
+ * mbuf.h
2469
+ * Memory buffer operations.
2470
+ *
2471
+ * Copyright (c) 2005 Marko Kreen
2472
+ * All rights reserved.
2473
+ *
2474
+ * Redistribution and use in source and binary forms, with or without
2475
+ * modification, are permitted provided that the following conditions
2476
+ * are met:
2477
+ * 1. Redistributions of source code must retain the above copyright
2478
+ * notice, this list of conditions and the following disclaimer.
2479
+ * 2. Redistributions in binary form must reproduce the above copyright
2480
+ * notice, this list of conditions and the following disclaimer in the
2481
+ * documentation and/or other materials provided with the distribution.
2482
+ *
2483
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2484
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2485
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2486
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2487
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2488
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2489
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2490
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2491
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2492
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2493
+ * SUCH DAMAGE.
2494
+ *
2495
+ * contrib/pgcrypto/mbuf.h
2496
+ */
2497
+
2498
+ ---
2499
+
2500
+ contrib/pgcrypto/openssl.c
2501
+
2502
+ /*
2503
+ * openssl.c
2504
+ * Wrapper for OpenSSL library.
2505
+ *
2506
+ * Copyright (c) 2001 Marko Kreen
2507
+ * All rights reserved.
2508
+ *
2509
+ * Redistribution and use in source and binary forms, with or without
2510
+ * modification, are permitted provided that the following conditions
2511
+ * are met:
2512
+ * 1. Redistributions of source code must retain the above copyright
2513
+ * notice, this list of conditions and the following disclaimer.
2514
+ * 2. Redistributions in binary form must reproduce the above copyright
2515
+ * notice, this list of conditions and the following disclaimer in the
2516
+ * documentation and/or other materials provided with the distribution.
2517
+ *
2518
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2519
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2520
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2521
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2522
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2523
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2524
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2525
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2526
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2527
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2528
+ * SUCH DAMAGE.
2529
+ *
2530
+ * contrib/pgcrypto/openssl.c
2531
+ */
2532
+
2533
+ ---
2534
+
2535
+ contrib/pgcrypto/pgcrypto.c
2536
+
2537
+ /*
2538
+ * pgcrypto.c
2539
+ * Various cryptographic stuff for PostgreSQL.
2540
+ *
2541
+ * Copyright (c) 2001 Marko Kreen
2542
+ * All rights reserved.
2543
+ *
2544
+ * Redistribution and use in source and binary forms, with or without
2545
+ * modification, are permitted provided that the following conditions
2546
+ * are met:
2547
+ * 1. Redistributions of source code must retain the above copyright
2548
+ * notice, this list of conditions and the following disclaimer.
2549
+ * 2. Redistributions in binary form must reproduce the above copyright
2550
+ * notice, this list of conditions and the following disclaimer in the
2551
+ * documentation and/or other materials provided with the distribution.
2552
+ *
2553
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2554
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2555
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2556
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2557
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2558
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2559
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2560
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2561
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2562
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2563
+ * SUCH DAMAGE.
2564
+ *
2565
+ * contrib/pgcrypto/pgcrypto.c
2566
+ */
2567
+
2568
+ ---
2569
+
2570
+ contrib/pgcrypto/pgcrypto.h
2571
+
2572
+ /*
2573
+ * pgcrypto.h
2574
+ * Header file for pgcrypto.
2575
+ *
2576
+ * Copyright (c) 2000 Marko Kreen
2577
+ * All rights reserved.
2578
+ *
2579
+ * Redistribution and use in source and binary forms, with or without
2580
+ * modification, are permitted provided that the following conditions
2581
+ * are met:
2582
+ * 1. Redistributions of source code must retain the above copyright
2583
+ * notice, this list of conditions and the following disclaimer.
2584
+ * 2. Redistributions in binary form must reproduce the above copyright
2585
+ * notice, this list of conditions and the following disclaimer in the
2586
+ * documentation and/or other materials provided with the distribution.
2587
+ *
2588
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2589
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2590
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2591
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2592
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2593
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2594
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2595
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2596
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2597
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2598
+ * SUCH DAMAGE.
2599
+ *
2600
+ * contrib/pgcrypto/pgcrypto.h
2601
+ */
2602
+
2603
+ ---
2604
+
2605
+ contrib/pgcrypto/pgp-armor.c
2606
+
2607
+ /*
2608
+ * pgp-armor.c
2609
+ * PGP ascii-armor.
2610
+ *
2611
+ * Copyright (c) 2005 Marko Kreen
2612
+ * All rights reserved.
2613
+ *
2614
+ * Redistribution and use in source and binary forms, with or without
2615
+ * modification, are permitted provided that the following conditions
2616
+ * are met:
2617
+ * 1. Redistributions of source code must retain the above copyright
2618
+ * notice, this list of conditions and the following disclaimer.
2619
+ * 2. Redistributions in binary form must reproduce the above copyright
2620
+ * notice, this list of conditions and the following disclaimer in the
2621
+ * documentation and/or other materials provided with the distribution.
2622
+ *
2623
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2624
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2625
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2626
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2627
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2628
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2629
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2630
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2631
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2632
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2633
+ * SUCH DAMAGE.
2634
+ *
2635
+ * contrib/pgcrypto/pgp-armor.c
2636
+ */
2637
+
2638
+ ---
2639
+
2640
+ contrib/pgcrypto/pgp-cfb.c
2641
+
2642
+ /*
2643
+ * pgp-cfb.c
2644
+ * Implements both normal and PGP-specific CFB mode.
2645
+ *
2646
+ * Copyright (c) 2005 Marko Kreen
2647
+ * All rights reserved.
2648
+ *
2649
+ * Redistribution and use in source and binary forms, with or without
2650
+ * modification, are permitted provided that the following conditions
2651
+ * are met:
2652
+ * 1. Redistributions of source code must retain the above copyright
2653
+ * notice, this list of conditions and the following disclaimer.
2654
+ * 2. Redistributions in binary form must reproduce the above copyright
2655
+ * notice, this list of conditions and the following disclaimer in the
2656
+ * documentation and/or other materials provided with the distribution.
2657
+ *
2658
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2659
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2660
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2661
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2662
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2663
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2664
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2665
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2666
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2667
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2668
+ * SUCH DAMAGE.
2669
+ *
2670
+ * contrib/pgcrypto/pgp-cfb.c
2671
+ */
2672
+
2673
+ ---
2674
+
2675
+ contrib/pgcrypto/pgp-compress.c
2676
+
2677
+ /*
2678
+ * pgp-compress.c
2679
+ * ZIP and ZLIB compression via zlib.
2680
+ *
2681
+ * Copyright (c) 2005 Marko Kreen
2682
+ * All rights reserved.
2683
+ *
2684
+ * Redistribution and use in source and binary forms, with or without
2685
+ * modification, are permitted provided that the following conditions
2686
+ * are met:
2687
+ * 1. Redistributions of source code must retain the above copyright
2688
+ * notice, this list of conditions and the following disclaimer.
2689
+ * 2. Redistributions in binary form must reproduce the above copyright
2690
+ * notice, this list of conditions and the following disclaimer in the
2691
+ * documentation and/or other materials provided with the distribution.
2692
+ *
2693
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2694
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2695
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2696
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2697
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2698
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2699
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2700
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2701
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2702
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2703
+ * SUCH DAMAGE.
2704
+ *
2705
+ * contrib/pgcrypto/pgp-compress.c
2706
+ */
2707
+
2708
+ ---
2709
+
2710
+ contrib/pgcrypto/pgp-decrypt.c
2711
+
2712
+ /*
2713
+ * pgp-decrypt.c
2714
+ * OpenPGP decrypt.
2715
+ *
2716
+ * Copyright (c) 2005 Marko Kreen
2717
+ * All rights reserved.
2718
+ *
2719
+ * Redistribution and use in source and binary forms, with or without
2720
+ * modification, are permitted provided that the following conditions
2721
+ * are met:
2722
+ * 1. Redistributions of source code must retain the above copyright
2723
+ * notice, this list of conditions and the following disclaimer.
2724
+ * 2. Redistributions in binary form must reproduce the above copyright
2725
+ * notice, this list of conditions and the following disclaimer in the
2726
+ * documentation and/or other materials provided with the distribution.
2727
+ *
2728
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2729
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2730
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2731
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2732
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2733
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2734
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2735
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2736
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2737
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2738
+ * SUCH DAMAGE.
2739
+ *
2740
+ * contrib/pgcrypto/pgp-decrypt.c
2741
+ */
2742
+
2743
+ ---
2744
+
2745
+ contrib/pgcrypto/pgp-encrypt.c
2746
+
2747
+ /*
2748
+ * pgp-encrypt.c
2749
+ * OpenPGP encrypt.
2750
+ *
2751
+ * Copyright (c) 2005 Marko Kreen
2752
+ * All rights reserved.
2753
+ *
2754
+ * Redistribution and use in source and binary forms, with or without
2755
+ * modification, are permitted provided that the following conditions
2756
+ * are met:
2757
+ * 1. Redistributions of source code must retain the above copyright
2758
+ * notice, this list of conditions and the following disclaimer.
2759
+ * 2. Redistributions in binary form must reproduce the above copyright
2760
+ * notice, this list of conditions and the following disclaimer in the
2761
+ * documentation and/or other materials provided with the distribution.
2762
+ *
2763
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2764
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2765
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2766
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2767
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2768
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2769
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2770
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2771
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2772
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2773
+ * SUCH DAMAGE.
2774
+ *
2775
+ * contrib/pgcrypto/pgp-encrypt.c
2776
+ */
2777
+
2778
+ ---
2779
+
2780
+ contrib/pgcrypto/pgp-info.c
2781
+
2782
+ /*
2783
+ * pgp-info.c
2784
+ * Provide info about PGP data.
2785
+ *
2786
+ * Copyright (c) 2005 Marko Kreen
2787
+ * All rights reserved.
2788
+ *
2789
+ * Redistribution and use in source and binary forms, with or without
2790
+ * modification, are permitted provided that the following conditions
2791
+ * are met:
2792
+ * 1. Redistributions of source code must retain the above copyright
2793
+ * notice, this list of conditions and the following disclaimer.
2794
+ * 2. Redistributions in binary form must reproduce the above copyright
2795
+ * notice, this list of conditions and the following disclaimer in the
2796
+ * documentation and/or other materials provided with the distribution.
2797
+ *
2798
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2799
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2800
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2801
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2802
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2803
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2804
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2805
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2806
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2807
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2808
+ * SUCH DAMAGE.
2809
+ *
2810
+ * contrib/pgcrypto/pgp-info.c
2811
+ */
2812
+
2813
+ ---
2814
+
2815
+ contrib/pgcrypto/pgp-mpi-openssl.c
2816
+
2817
+ /*
2818
+ * pgp-mpi-openssl.c
2819
+ * OpenPGP MPI functions using OpenSSL BIGNUM code.
2820
+ *
2821
+ * Copyright (c) 2005 Marko Kreen
2822
+ * All rights reserved.
2823
+ *
2824
+ * Redistribution and use in source and binary forms, with or without
2825
+ * modification, are permitted provided that the following conditions
2826
+ * are met:
2827
+ * 1. Redistributions of source code must retain the above copyright
2828
+ * notice, this list of conditions and the following disclaimer.
2829
+ * 2. Redistributions in binary form must reproduce the above copyright
2830
+ * notice, this list of conditions and the following disclaimer in the
2831
+ * documentation and/or other materials provided with the distribution.
2832
+ *
2833
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2834
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2835
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2836
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2837
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2838
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2839
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2840
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2841
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2842
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2843
+ * SUCH DAMAGE.
2844
+ *
2845
+ * contrib/pgcrypto/pgp-mpi-openssl.c
2846
+ */
2847
+
2848
+ ---
2849
+
2850
+ contrib/pgcrypto/pgp-mpi.c
2851
+
2852
+ /*
2853
+ * pgp-mpi.c
2854
+ * OpenPGP MPI helper functions.
2855
+ *
2856
+ * Copyright (c) 2005 Marko Kreen
2857
+ * All rights reserved.
2858
+ *
2859
+ * Redistribution and use in source and binary forms, with or without
2860
+ * modification, are permitted provided that the following conditions
2861
+ * are met:
2862
+ * 1. Redistributions of source code must retain the above copyright
2863
+ * notice, this list of conditions and the following disclaimer.
2864
+ * 2. Redistributions in binary form must reproduce the above copyright
2865
+ * notice, this list of conditions and the following disclaimer in the
2866
+ * documentation and/or other materials provided with the distribution.
2867
+ *
2868
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2869
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2870
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2871
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2872
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2873
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2874
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2875
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2876
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2877
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2878
+ * SUCH DAMAGE.
2879
+ *
2880
+ * contrib/pgcrypto/pgp-mpi.c
2881
+ */
2882
+
2883
+ ---
2884
+
2885
+ contrib/pgcrypto/pgp-pgsql.c
2886
+
2887
+ /*
2888
+ * pgp-pgsql.c
2889
+ * PostgreSQL wrappers for pgp.
2890
+ *
2891
+ * Copyright (c) 2005 Marko Kreen
2892
+ * All rights reserved.
2893
+ *
2894
+ * Redistribution and use in source and binary forms, with or without
2895
+ * modification, are permitted provided that the following conditions
2896
+ * are met:
2897
+ * 1. Redistributions of source code must retain the above copyright
2898
+ * notice, this list of conditions and the following disclaimer.
2899
+ * 2. Redistributions in binary form must reproduce the above copyright
2900
+ * notice, this list of conditions and the following disclaimer in the
2901
+ * documentation and/or other materials provided with the distribution.
2902
+ *
2903
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2904
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2905
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2906
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2907
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2908
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2909
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2910
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2911
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2912
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2913
+ * SUCH DAMAGE.
2914
+ *
2915
+ * contrib/pgcrypto/pgp-pgsql.c
2916
+ */
2917
+
2918
+ ---
2919
+
2920
+ contrib/pgcrypto/pgp-pubdec.c
2921
+
2922
+ /*
2923
+ * pgp-pubdec.c
2924
+ * Decrypt public-key encrypted session key.
2925
+ *
2926
+ * Copyright (c) 2005 Marko Kreen
2927
+ * All rights reserved.
2928
+ *
2929
+ * Redistribution and use in source and binary forms, with or without
2930
+ * modification, are permitted provided that the following conditions
2931
+ * are met:
2932
+ * 1. Redistributions of source code must retain the above copyright
2933
+ * notice, this list of conditions and the following disclaimer.
2934
+ * 2. Redistributions in binary form must reproduce the above copyright
2935
+ * notice, this list of conditions and the following disclaimer in the
2936
+ * documentation and/or other materials provided with the distribution.
2937
+ *
2938
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2939
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2940
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2941
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2942
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2943
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2944
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2945
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2946
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2947
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2948
+ * SUCH DAMAGE.
2949
+ *
2950
+ * contrib/pgcrypto/pgp-pubdec.c
2951
+ */
2952
+
2953
+ ---
2954
+
2955
+ contrib/pgcrypto/pgp-pubenc.c
2956
+
2957
+ /*
2958
+ * pgp-pubenc.c
2959
+ * Encrypt session key with public key.
2960
+ *
2961
+ * Copyright (c) 2005 Marko Kreen
2962
+ * All rights reserved.
2963
+ *
2964
+ * Redistribution and use in source and binary forms, with or without
2965
+ * modification, are permitted provided that the following conditions
2966
+ * are met:
2967
+ * 1. Redistributions of source code must retain the above copyright
2968
+ * notice, this list of conditions and the following disclaimer.
2969
+ * 2. Redistributions in binary form must reproduce the above copyright
2970
+ * notice, this list of conditions and the following disclaimer in the
2971
+ * documentation and/or other materials provided with the distribution.
2972
+ *
2973
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2974
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2975
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2976
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2977
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2978
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2979
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2980
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2981
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2982
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2983
+ * SUCH DAMAGE.
2984
+ *
2985
+ * contrib/pgcrypto/pgp-pubenc.c
2986
+ */
2987
+
2988
+ ---
2989
+
2990
+ contrib/pgcrypto/pgp-pubkey.c
2991
+
2992
+ /*
2993
+ * pgp-pubkey.c
2994
+ * Read public or secret key.
2995
+ *
2996
+ * Copyright (c) 2005 Marko Kreen
2997
+ * All rights reserved.
2998
+ *
2999
+ * Redistribution and use in source and binary forms, with or without
3000
+ * modification, are permitted provided that the following conditions
3001
+ * are met:
3002
+ * 1. Redistributions of source code must retain the above copyright
3003
+ * notice, this list of conditions and the following disclaimer.
3004
+ * 2. Redistributions in binary form must reproduce the above copyright
3005
+ * notice, this list of conditions and the following disclaimer in the
3006
+ * documentation and/or other materials provided with the distribution.
3007
+ *
3008
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3009
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3010
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3011
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3012
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3013
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3014
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3015
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3016
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3017
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3018
+ * SUCH DAMAGE.
3019
+ *
3020
+ * contrib/pgcrypto/pgp-pubkey.c
3021
+ */
3022
+
3023
+ ---
3024
+
3025
+ contrib/pgcrypto/pgp-s2k.c
3026
+
3027
+ /*
3028
+ * pgp-s2k.c
3029
+ * OpenPGP string2key functions.
3030
+ *
3031
+ * Copyright (c) 2005 Marko Kreen
3032
+ * All rights reserved.
3033
+ *
3034
+ * Redistribution and use in source and binary forms, with or without
3035
+ * modification, are permitted provided that the following conditions
3036
+ * are met:
3037
+ * 1. Redistributions of source code must retain the above copyright
3038
+ * notice, this list of conditions and the following disclaimer.
3039
+ * 2. Redistributions in binary form must reproduce the above copyright
3040
+ * notice, this list of conditions and the following disclaimer in the
3041
+ * documentation and/or other materials provided with the distribution.
3042
+ *
3043
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3044
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3045
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3046
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3047
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3048
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3049
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3050
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3051
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3052
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3053
+ * SUCH DAMAGE.
3054
+ *
3055
+ * contrib/pgcrypto/pgp-s2k.c
3056
+ */
3057
+
3058
+ ---
3059
+
3060
+ contrib/pgcrypto/pgp.c
3061
+
3062
+ /*
3063
+ * pgp.c
3064
+ * Various utility stuff.
3065
+ *
3066
+ * Copyright (c) 2005 Marko Kreen
3067
+ * All rights reserved.
3068
+ *
3069
+ * Redistribution and use in source and binary forms, with or without
3070
+ * modification, are permitted provided that the following conditions
3071
+ * are met:
3072
+ * 1. Redistributions of source code must retain the above copyright
3073
+ * notice, this list of conditions and the following disclaimer.
3074
+ * 2. Redistributions in binary form must reproduce the above copyright
3075
+ * notice, this list of conditions and the following disclaimer in the
3076
+ * documentation and/or other materials provided with the distribution.
3077
+ *
3078
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3079
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3080
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3081
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3082
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3083
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3084
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3085
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3086
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3087
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3088
+ * SUCH DAMAGE.
3089
+ *
3090
+ * contrib/pgcrypto/pgp.c
3091
+ */
3092
+
3093
+ ---
3094
+
3095
+ contrib/pgcrypto/pgp.h
3096
+
3097
+ /*
3098
+ * pgp.h
3099
+ * OpenPGP implementation.
3100
+ *
3101
+ * Copyright (c) 2005 Marko Kreen
3102
+ * All rights reserved.
3103
+ *
3104
+ * Redistribution and use in source and binary forms, with or without
3105
+ * modification, are permitted provided that the following conditions
3106
+ * are met:
3107
+ * 1. Redistributions of source code must retain the above copyright
3108
+ * notice, this list of conditions and the following disclaimer.
3109
+ * 2. Redistributions in binary form must reproduce the above copyright
3110
+ * notice, this list of conditions and the following disclaimer in the
3111
+ * documentation and/or other materials provided with the distribution.
3112
+ *
3113
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3114
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3115
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3116
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3117
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3118
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3119
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3120
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3121
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3122
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3123
+ * SUCH DAMAGE.
3124
+ *
3125
+ * contrib/pgcrypto/pgp.h
3126
+ */
3127
+
3128
+ ---
3129
+
3130
+ contrib/pgcrypto/px-crypt.c
3131
+
3132
+ /*
3133
+ * px-crypt.c
3134
+ * Wrapper for various crypt algorithms.
3135
+ *
3136
+ * Copyright (c) 2001 Marko Kreen
3137
+ * All rights reserved.
3138
+ *
3139
+ * Redistribution and use in source and binary forms, with or without
3140
+ * modification, are permitted provided that the following conditions
3141
+ * are met:
3142
+ * 1. Redistributions of source code must retain the above copyright
3143
+ * notice, this list of conditions and the following disclaimer.
3144
+ * 2. Redistributions in binary form must reproduce the above copyright
3145
+ * notice, this list of conditions and the following disclaimer in the
3146
+ * documentation and/or other materials provided with the distribution.
3147
+ *
3148
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3149
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3150
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3151
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3152
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3153
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3154
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3155
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3156
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3157
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3158
+ * SUCH DAMAGE.
3159
+ *
3160
+ * contrib/pgcrypto/px-crypt.c
3161
+ */
3162
+
3163
+ ---
3164
+
3165
+ contrib/pgcrypto/px-crypt.h
3166
+
3167
+ /*
3168
+ * px-crypt.h
3169
+ * Header file for px_crypt().
3170
+ *
3171
+ * Copyright (c) 2001 Marko Kreen
3172
+ * All rights reserved.
3173
+ *
3174
+ * Redistribution and use in source and binary forms, with or without
3175
+ * modification, are permitted provided that the following conditions
3176
+ * are met:
3177
+ * 1. Redistributions of source code must retain the above copyright
3178
+ * notice, this list of conditions and the following disclaimer.
3179
+ * 2. Redistributions in binary form must reproduce the above copyright
3180
+ * notice, this list of conditions and the following disclaimer in the
3181
+ * documentation and/or other materials provided with the distribution.
3182
+ *
3183
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3184
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3185
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3186
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3187
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3188
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3189
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3190
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3191
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3192
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3193
+ * SUCH DAMAGE.
3194
+ *
3195
+ * contrib/pgcrypto/px-crypt.h
3196
+ */
3197
+
3198
+ ---
3199
+
3200
+ contrib/pgcrypto/px-hmac.c
3201
+
3202
+ /*
3203
+ * px-hmac.c
3204
+ * HMAC implementation.
3205
+ *
3206
+ * Copyright (c) 2001 Marko Kreen
3207
+ * All rights reserved.
3208
+ *
3209
+ * Redistribution and use in source and binary forms, with or without
3210
+ * modification, are permitted provided that the following conditions
3211
+ * are met:
3212
+ * 1. Redistributions of source code must retain the above copyright
3213
+ * notice, this list of conditions and the following disclaimer.
3214
+ * 2. Redistributions in binary form must reproduce the above copyright
3215
+ * notice, this list of conditions and the following disclaimer in the
3216
+ * documentation and/or other materials provided with the distribution.
3217
+ *
3218
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3219
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3220
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3221
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3222
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3223
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3224
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3225
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3226
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3227
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3228
+ * SUCH DAMAGE.
3229
+ *
3230
+ * contrib/pgcrypto/px-hmac.c
3231
+ */
3232
+
3233
+ ---
3234
+
3235
+ contrib/pgcrypto/px.c
3236
+
3237
+ /*
3238
+ * px.c
3239
+ * Various cryptographic stuff for PostgreSQL.
3240
+ *
3241
+ * Copyright (c) 2001 Marko Kreen
3242
+ * All rights reserved.
3243
+ *
3244
+ * Redistribution and use in source and binary forms, with or without
3245
+ * modification, are permitted provided that the following conditions
3246
+ * are met:
3247
+ * 1. Redistributions of source code must retain the above copyright
3248
+ * notice, this list of conditions and the following disclaimer.
3249
+ * 2. Redistributions in binary form must reproduce the above copyright
3250
+ * notice, this list of conditions and the following disclaimer in the
3251
+ * documentation and/or other materials provided with the distribution.
3252
+ *
3253
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3254
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3255
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3256
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3257
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3258
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3259
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3260
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3261
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3262
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3263
+ * SUCH DAMAGE.
3264
+ *
3265
+ * contrib/pgcrypto/px.c
3266
+ */
3267
+
3268
+ ---
3269
+
3270
+ contrib/pgcrypto/px.h
3271
+
3272
+ /*
3273
+ * px.h
3274
+ * Header file for pgcrypto.
3275
+ *
3276
+ * Copyright (c) 2001 Marko Kreen
3277
+ * All rights reserved.
3278
+ *
3279
+ * Redistribution and use in source and binary forms, with or without
3280
+ * modification, are permitted provided that the following conditions
3281
+ * are met:
3282
+ * 1. Redistributions of source code must retain the above copyright
3283
+ * notice, this list of conditions and the following disclaimer.
3284
+ * 2. Redistributions in binary form must reproduce the above copyright
3285
+ * notice, this list of conditions and the following disclaimer in the
3286
+ * documentation and/or other materials provided with the distribution.
3287
+ *
3288
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
3289
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
3290
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
3291
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
3292
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3293
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3294
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3295
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3296
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3297
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3298
+ * SUCH DAMAGE.
3299
+ *
3300
+ * contrib/pgcrypto/px.h
3301
+ */
3302
+
3303
+ ---
3304
+
3305
+ contrib/pgrowlocks/pgrowlocks.c
3306
+
3307
+ /*
3308
+ * contrib/pgrowlocks/pgrowlocks.c
3309
+ *
3310
+ * Copyright (c) 2005-2006 Tatsuo Ishii
3311
+ *
3312
+ * Permission to use, copy, modify, and distribute this software and
3313
+ * its documentation for any purpose, without fee, and without a
3314
+ * written agreement is hereby granted, provided that the above
3315
+ * copyright notice and this paragraph and the following two
3316
+ * paragraphs appear in all copies.
3317
+ *
3318
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
3319
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
3320
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
3321
+ * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
3322
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
3323
+ *
3324
+ * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
3325
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3326
+ * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
3327
+ * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
3328
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
3329
+ */
3330
+
3331
+ ---
3332
+
3333
+ contrib/pgstattuple/pgstatindex.c
3334
+
3335
+ /*
3336
+ * contrib/pgstattuple/pgstatindex.c
3337
+ *
3338
+ *
3339
+ * pgstatindex
3340
+ *
3341
+ * Copyright (c) 2006 Satoshi Nagayasu <nagayasus@nttdata.co.jp>
3342
+ *
3343
+ * Permission to use, copy, modify, and distribute this software and
3344
+ * its documentation for any purpose, without fee, and without a
3345
+ * written agreement is hereby granted, provided that the above
3346
+ * copyright notice and this paragraph and the following two
3347
+ * paragraphs appear in all copies.
3348
+ *
3349
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
3350
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
3351
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
3352
+ * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
3353
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
3354
+ *
3355
+ * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
3356
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3357
+ * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
3358
+ * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
3359
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
3360
+ */
3361
+
3362
+ ---
3363
+
3364
+ contrib/pgstattuple/pgstattuple.c
3365
+
3366
+ /*
3367
+ * contrib/pgstattuple/pgstattuple.c
3368
+ *
3369
+ * Copyright (c) 2001,2002 Tatsuo Ishii
3370
+ *
3371
+ * Permission to use, copy, modify, and distribute this software and
3372
+ * its documentation for any purpose, without fee, and without a
3373
+ * written agreement is hereby granted, provided that the above
3374
+ * copyright notice and this paragraph and the following two
3375
+ * paragraphs appear in all copies.
3376
+ *
3377
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
3378
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
3379
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
3380
+ * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
3381
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
3382
+ *
3383
+ * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
3384
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3385
+ * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
3386
+ * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
3387
+ * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
3388
+ */
3389
+
3390
+ ---
3391
+
3392
+ contrib/tablefunc/tablefunc.c
3393
+
3394
+ /*
3395
+ * contrib/tablefunc/tablefunc.c
3396
+ *
3397
+ *
3398
+ * tablefunc
3399
+ *
3400
+ * Sample to demonstrate C functions which return setof scalar
3401
+ * and setof composite.
3402
+ * Joe Conway <mail@joeconway.com>
3403
+ * And contributors:
3404
+ * Nabil Sayegh <postgresql@e-trolley.de>
3405
+ *
3406
+ * Copyright (c) 2002-2025, PostgreSQL Global Development Group
3407
+ *
3408
+ * Permission to use, copy, modify, and distribute this software and its
3409
+ * documentation for any purpose, without fee, and without a written agreement
3410
+ * is hereby granted, provided that the above copyright notice and this
3411
+ * paragraph and the following two paragraphs appear in all copies.
3412
+ *
3413
+ * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR
3414
+ * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
3415
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
3416
+ * DOCUMENTATION, EVEN IF THE AUTHOR OR DISTRIBUTORS HAVE BEEN ADVISED OF THE
3417
+ * POSSIBILITY OF SUCH DAMAGE.
3418
+ *
3419
+ * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
3420
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
3421
+ * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
3422
+ * ON AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAS NO OBLIGATIONS TO
3423
+ * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
3424
+ *
3425
+ */
3426
+
3427
+ ---
3428
+
3429
+ src/backend/regex/COPYRIGHT
3430
+
3431
+ This regular expression package was originally developed by Henry Spencer.
3432
+ It bears the following copyright notice:
3433
+
3434
+ **********************************************************************
3435
+
3436
+ Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
3437
+
3438
+ Development of this software was funded, in part, by Cray Research Inc.,
3439
+ UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics
3440
+ Corporation, none of whom are responsible for the results. The author
3441
+ thanks all of them.
3442
+
3443
+ Redistribution and use in source and binary forms -- with or without
3444
+ modification -- are permitted for any purpose, provided that
3445
+ redistributions in source form retain this entire copyright notice and
3446
+ indicate the origin and nature of any modifications.
3447
+
3448
+ I'd appreciate being given credit for this package in the documentation
3449
+ of software which uses it, but that is not a requirement.
3450
+
3451
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
3452
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
3453
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
3454
+ HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
3455
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
3456
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
3457
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
3458
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3459
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
3460
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3461
+
3462
+ **********************************************************************
3463
+
3464
+ PostgreSQL adopted the code out of Tcl 8.4.1. Portions of regc_locale.c
3465
+ and re_syntax.n were developed by Tcl developers other than Henry; these
3466
+ files bear the Tcl copyright and license notice:
3467
+
3468
+ **********************************************************************
3469
+
3470
+ This software is copyrighted by the Regents of the University of
3471
+ California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
3472
+ Corporation and other parties. The following terms apply to all files
3473
+ associated with the software unless explicitly disclaimed in
3474
+ individual files.
3475
+
3476
+ The authors hereby grant permission to use, copy, modify, distribute,
3477
+ and license this software and its documentation for any purpose, provided
3478
+ that existing copyright notices are retained in all copies and that this
3479
+ notice is included verbatim in any distributions. No written agreement,
3480
+ license, or royalty fee is required for any of the authorized uses.
3481
+ Modifications to this software may be copyrighted by their authors
3482
+ and need not follow the licensing terms described here, provided that
3483
+ the new terms are clearly indicated on the first page of each file where
3484
+ they apply.
3485
+
3486
+ IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
3487
+ FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
3488
+ ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
3489
+ DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
3490
+ POSSIBILITY OF SUCH DAMAGE.
3491
+
3492
+ THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
3493
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
3494
+ FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
3495
+ IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
3496
+ NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
3497
+ MODIFICATIONS.
3498
+
3499
+ GOVERNMENT USE: If you are acquiring this software on behalf of the
3500
+ U.S. government, the Government shall have only "Restricted Rights"
3501
+ in the software and related documentation as defined in the Federal
3502
+ Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
3503
+ are acquiring the software on behalf of the Department of Defense, the
3504
+ software shall be classified as "Commercial Computer Software" and the
3505
+ Government shall have only "Restricted Rights" as defined in Clause
3506
+ 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the
3507
+ authors grant the U.S. Government and others acting in its behalf
3508
+ permission to use and distribute the software in accordance with the
3509
+ terms specified in this license.
3510
+
3511
+ **********************************************************************
3512
+
3513
+ Subsequent modifications to the code by the PostgreSQL project follow
3514
+ the same license terms as the rest of PostgreSQL.
3515
+
3516
+
3517
+ ---
3518
+
3519
+ src/backend/snowball/README
3520
+
3521
+ src/backend/snowball/README
3522
+
3523
+ Snowball-Based Stemming
3524
+ =======================
3525
+
3526
+ This module uses the word stemming code developed by the Snowball project,
3527
+ http://snowballstem.org (formerly http://snowball.tartarus.org)
3528
+ which is released by them under a BSD-style license.
3529
+
3530
+ The Snowball project does not often make formal releases; it's best
3531
+ to pull from their git repository
3532
+
3533
+ git clone https://github.com/snowballstem/snowball.git
3534
+
3535
+ and then building the derived files is as simple as
3536
+
3537
+ cd snowball
3538
+ make
3539
+
3540
+ At least on Linux, no platform-specific adjustment is needed.
3541
+
3542
+ Postgres' files under src/backend/snowball/libstemmer/ and
3543
+ src/include/snowball/libstemmer/ are taken directly from the Snowball
3544
+ files, with only some minor adjustments of file inclusions. Note
3545
+ that most of these files are in fact derived files, not original source.
3546
+ The original sources are in the Snowball language, and are built using
3547
+ the Snowball-to-C compiler that is also part of the Snowball project.
3548
+ We choose to include the derived files in the PostgreSQL distribution
3549
+ because most installations will not have the Snowball compiler available.
3550
+
3551
+ We are currently synced with the Snowball git commit
3552
+ d19326ac6c1b9a417fc872f7c2f845265a5e9ece
3553
+ of 2025-02-19.
3554
+
3555
+ To update the PostgreSQL sources from a new Snowball version:
3556
+
3557
+ 0. If you didn't do it already, "make -C snowball".
3558
+
3559
+ 1. Copy the *.c files in snowball/src_c/ to src/backend/snowball/libstemmer
3560
+ with replacement of "../runtime/header.h" by "header.h", for example
3561
+
3562
+ for f in .../snowball/src_c/*.c
3563
+ do
3564
+ sed 's|\.\./runtime/header\.h|header.h|' $f >libstemmer/`basename $f`
3565
+ done
3566
+
3567
+ Do not copy stemmers that are listed in their libstemmer/modules.txt as
3568
+ nonstandard, such as "kraaij_pohlmann" or "lovins".
3569
+
3570
+ 2. Copy the *.c files in snowball/runtime/ to
3571
+ src/backend/snowball/libstemmer, and edit them to remove direct inclusions
3572
+ of system headers such as <stdio.h> --- they should only include "header.h".
3573
+ (This removal avoids portability problems on some platforms where <stdio.h>
3574
+ is sensitive to largefile compilation options.)
3575
+
3576
+ 3. Copy the *.h files in snowball/src_c/ and snowball/runtime/
3577
+ to src/include/snowball/libstemmer. At this writing the header files
3578
+ do not require any changes. Again, omit the *.h files for nonstandard
3579
+ stemmers.
3580
+
3581
+ 4. Check whether any stemmer modules have been added or removed. If so, edit
3582
+ the OBJS list in Makefile, the dict_snowball_sources list in meson.build,
3583
+ the list of #include's and the stemmer_modules[] table in dict_snowball.c,
3584
+ and the sample \dFd output in the documentation in textsearch.sgml.
3585
+ You might also need to change the @languages array in snowball_create.pl
3586
+ and the tsearch_config_languages[] table in initdb.c.
3587
+
3588
+ 5. The various stopword files in stopwords/ must be downloaded
3589
+ individually from pages on the snowballstem.org website.
3590
+ Be careful that these files must be stored in UTF-8 encoding.
3591
+ Update the stop_files list in Makefile if any are added or removed
3592
+ (the meson tooling does not require adjustment for that, though).