Read pg_text from postgres as R vector type

Hello,
When connecting to my Postgres database (through DBI::dbConnect), I find that all the TEXT, FLOAT, and BOOL fields are converted to strings in dbplyr.

The tbl connection has been converted to a data.frame() for exploration purposes

I would like these arrays to be treated as vectors, rather than strings. dbplyr::dbSetDataMappings() seems to be the functionality that I am looking for, however, this function has been depreciated, as no generic implementation could be created -- understandably so. String processing is also not a solution, as there would likely be out of memory issues.

Two questions:

  • Is R equipped to deal with this, or should I look for similar functionality in python?
  • Do I fundamentally have the data set up wrong? That is, should position_in_list be its own field, thus eliminating the need for an Array datatype in Postgres?

Thanks!

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.