Project

General

Profile

Actions

Bug #826

closed
KR

Postgres backend does not work for boolean types

Bug #826: Postgres backend does not work for boolean types

Added by Kurt Roeckx over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/15/2011
Due date:
% Done:

0%

Estimated time:

Description

Hi,

With a postgres backend with a true value in the database, I get false back.

I think the problem is this piece of code:
if (strcmp(v, "f") 0)
return 0;
else if (strcmp(v, "t") 0)
return 1;

I think it should set *value to 0 / 1 and return true.

I'm also not sure it's a good idea to rely on the output being "t" or "f".

Kurt

KR Updated by Kurt Roeckx over 15 years ago Actions #1

Kurt Roeckx wrote:

With a postgres backend with a true value in the database, I get false back.

This is only the case for find. The class member will always be false.

In case of query or query<boost::optional > things work as expected.

I did not try a boost::optional inside a class.

Kurt

KD Updated by Koen Deforche about 15 years ago Actions #2

  • Status changed from New to Resolved

Hey Kurt,

Good observation. This has been fixed in git HEAD.

Regards,
koen

KD Updated by Koen Deforche about 15 years ago Actions #3

  • Target version set to 3.1.10

KD Updated by Koen Deforche about 15 years ago Actions #4

  • Status changed from Resolved to Closed

AK Updated by Ariel Kruger almost 13 years ago Actions #5

I am still having problem with this...
Can anyone check if the problem still exist?

AK Updated by Ariel Kruger almost 13 years ago Actions #6

sorry, it was a mistake of mine...
It is working perfectly

Actions

Also available in: PDF Atom