1

I'm using redash on a PostgreSQL db and for some of our tables, querying all columns using SELECT * returns an error akin to column X is not JSON serializable. My understanding is that it's because a column contains a datetime range (and doesn't play well with redash).

Is there a way in postgres to easily retrieve all columns, while converting a specfic one to text? Or even converting all columns to text?

So far, in order to do this, I have to list out every column name and convert the culprit to text.

My hope is finding something along the lines of:

SELECT created_at::text, *

or...

SELECT *::text

Where the wonky column (created_at) is converted to text, and somehow appended to everything else.

Ardit
  • 1,522
  • 17
  • 23
MacAnRiogh
  • 75
  • 6
  • you can try to hack it with `SELECT *,created_at::text` - so the last column with same name would be text - I saw it working with pg-node eg – Vao Tsun Sep 28 '17 at 07:54

0 Answers0