On Fri, August 10, 2007 19:38, Denis Dzyubenko wrote:

> I have a problem with writing values of type double in pqxx. I've
> already created a ticket (#116), but received no feedback. Maybe the
> ticket was unclear, so I'll try to explain my problem.

No, it was very clear!  I'm sorry for not following up; I think I kept the
ticket open in a browser tab to get back to later, and then lost my
session state.


> template<typename T> inline string to_string_fallback(T Obj)
> {
>   stringstream S;
> #ifdef PQXX_HAVE_IMBUE
>   S.imbue(locale("C"));
> #endif
>   S.precision(41); // ADD THIS LINE

And this was the reason why I wanted to follow up on the matter: we don't
want to lose any precision, so is there some way to tell S "give us as
much precision as you can usefully represent"?  Just setting a precision
of 41 seems a bit arbitrary.  :-)


Jeroen


_______________________________________________
Libpqxx-general mailing list
Libpqxx-general@gborg.postgresql.org
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to