Formatting query output
От | Pedro Miguel Frazao Fernandes Ferreira |
---|---|
Тема | Formatting query output |
Дата | |
Msg-id | 3DBD5014.7060809@ualg.pt обсуждение исходный текст |
Ответы |
Re: Formatting query output
|
Список | pgsql-general |
Hi All, I am using libpq to interface PostgreSQL with Matlab. My question is about formatting query results: If I have a table field which is of type float8 and I insert, for example, a value of 4503599627370496, when I do a select on this table field I get 4.5035996273705e+15. The query result is rounded. When I use libpq's PQgetvalue() this is the value I get. PQftype() correctly indicates a float8. How can I get the actual (503599627370496) value by doing a direct query to this field (maintaining PQftype() float8 result) ? I can do it whit PostgreSQL function to_char() but the field type will be set to some CHAR based type. I woul like to have the actual value along with a PQftype() float8 result. Thanks for any help. Pedro M. Ferreira -- ---------------------------------------------------------------------- Pedro Miguel Frazao Fernandes Ferreira Universidade do Algarve Faculdade de Ciencias e Tecnologia Campus de Gambelas 8000-117 Faro Portugal Tel./Fax: (+351) 289 800950 / 289 819403 http://w3.ualg.pt/~pfrazao
В списке pgsql-general по дате отправления: