Skip to content

A variation on Issue 949 comes back to life? #3295

@omatai

Description

@omatai

I am trying a simple SELECT * FROM table type query via Poco on a PostgreSQL database. As in Issue #949 I am getting a "Data type not supported" exception because one of the two columns in the table I am selecting from has TEXT data type. I am using Poco 1.10.1.

Following guidance at the top of the doc page for Poco::Data::RecordSet I am trying this:

void MyDBWrapper::RunQuery( const std::string & queryString )
{
    Statement query( *m_pSession );
    query << queryString;    // e.g. queryString is "SELECT * FROM table"
    query.execute();
    // all subsequent code using RecordSet recSet( query ) rendered irrelevant due to exception...
}

The m_pSession variable in MyDBWrapper is a std::unique_ptr<Session>. It is dynamic so that I can call PostgreSQL::Connector::registerConnector() in the wrapper constructor before I create the session. This works fine so long as there are no CLOB columns in the table I put in the query. But the moment the table has a CLOB column, query.execute() throws an exception. Am I missing something?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions