I am using PHP with PostgreSQL. I have the following query:
SELECT ra, de, concat(ra, de) AS com, count(*) OVER() AS total_rows
FROM mdust
LIMIT :pagesize OFFSET :starts
The columns ra
and de
are floats where de
can be positive or negative, however, the de
does not return the +
associated with the float. It does however return the -
negative sign. What I want is for the de
column within concat(ra, de)
to return back the positive or negative sign.
I was looking at this documentation for PostgreSQL which provides to_char(1, 'S9')
which is exactly what I want but it only works for integers. I was unable to find such a function for floats.