Commit fc9b7e9
committed
Fix sphere() functions to use explicit cast for WHPG compatibility
The sphere() SQL functions were defined as 'SELECT ROW($1, $2)' which
returns a generic record type. WHPG (Greenplum/PostgreSQL 12.12) is
stricter about type matching in SQL function bodies and requires the
return value to match the declared composite type exactly.
This caused runtime errors:
ERROR: return type mismatch in function declared to return
sphere_vector
DETAIL: Final statement returns record instead of vector at column 1.
Fix by adding explicit casts: 'SELECT ROW($1, $2)::sphere_vector'1 parent ba61554 commit fc9b7e9
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments