Don't pay attention to uselessness of the provided query, it's just a simplified part of a complex one.
I run query:
SELECT elem FROM (SELECT id FROM data) AS elem;
It yields the result:
elem
------
(5)
(4)
(24)
(3)
(23)
Why does each value enclosed in parentheses?
So, to fix it I do:
SELECT trim(elem::text, ')(') FROM (SELECT id FROM data) AS elem;
I have a feeling it should not be that way...
SELECT elem.id FROM (SELECT id FROM data) AS elem;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With