Commit 19d5b3e
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'
Signed-off-by: Narek Galstyan <narekg@berkeley.edu>1 parent 0c20146 commit 19d5b3e
1 file changed
Lines changed: 4 additions & 4 deletions
| 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