I am using postGIS but I also have a need to store the raw lat and lng values.
My req.body looks like this:
{
"kind": 3
"lat": "33.155631",
"lng": "-118.236325"
}
If I try to insert, I get an inconsistent types deduced for parameter error.
Something like:
client.query(
'INSERT INTO test(kind, lat, lng)\
values($1, $2, $3)',
[
data.kind,
data.lat,
data.lng
],
////
)
name: 'error',
length: 156,
severity: 'ERROR',
code: '42P08',
detail: 'double precision versus numeric',
hint: undefined,
position: '99',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'parse_param.c',
line: '221',
routine: 'variable_coerce_param_hook' }
I am using postGIS but I also have a need to store the raw lat and lng values.
My
req.bodylooks like this:If I try to insert, I get an
inconsistent types deduced for parametererror.Something like: