Re: [GENERAL] Results interpretation

2017-08-19 Thread Daniel Verite
Igor Korot wrote: > In my case I simply executing: > > SELECT t.table_catalog AS catalog, t.table_schema AS schema, > t.table_name AS table, u.usename AS owner, c.oid AS table_id FROM > information_schema.tables t, pg_catalog.pg_class c, pg_catalog.pg_user > u WHERE t.table_name =

Re: [GENERAL] Results interpretation

2017-08-19 Thread Igor Korot
Hi, Daniel, On Sat, Aug 19, 2017 at 12:51 PM, Daniel Verite wrote: > Igor Korot wrote: > >> If I do PQexec() call, the results will be interpreted as binary or text? >> >> I'm trying to get an int field from the query and wonder if I need to do >> hton() call or

Re: [GENERAL] Results interpretation

2017-08-19 Thread Daniel Verite
Igor Korot wrote: > If I do PQexec() call, the results will be interpreted as binary or text? > > I'm trying to get an int field from the query and wonder if I need to do > hton() call or not? In the most general case, you may call PQfformat(const PGresult *res, int column_number) to

Re: [GENERAL] Results interpretation

2017-08-18 Thread Vincenzo Romano
Il 18 ago 2017 21:59, "Vincenzo Romano" ha scritto: Il 18 ago 2017 21:08, "Igor Korot" ha scritto: Hi, Vincenzo, On Fri, Aug 18, 2017 at 2:52 PM, Vincenzo Romano wrote: > What I can tell you is not more of what

Re: [GENERAL] Results interpretation

2017-08-18 Thread Vincenzo Romano
Il 18 ago 2017 21:08, "Igor Korot" ha scritto: Hi, Vincenzo, On Fri, Aug 18, 2017 at 2:52 PM, Vincenzo Romano wrote: > What I can tell you is not more of what is in the documentation. > > https://www.postgresql.org/docs/9.6/static/libpq-exec.

Re: [GENERAL] Results interpretation

2017-08-18 Thread Igor Korot
Hi, Vincenzo, On Fri, Aug 18, 2017 at 2:52 PM, Vincenzo Romano wrote: > What I can tell you is not more of what is in the documentation. > > https://www.postgresql.org/docs/9.6/static/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO > > > In particular see the function

Re: [GENERAL] Results interpretation

2017-08-18 Thread Vincenzo Romano
What I can tell you is not more of what is in the documentation. https://www.postgresql.org/docs/9.6/static/libpq-exec. html#LIBPQ-EXEC-SELECT-INFO In particular see the function PQBinaryTuples. -- Vincenzo Romano - NotOrAnd.IT Information Technologies -- NON QVIETIS MARIBVS NAVTA PERITVS Il

Re: [GENERAL] Results interpretation

2017-08-18 Thread Igor Korot
Hi, Vincenzo, On Fri, Aug 18, 2017 at 1:51 PM, Vincenzo Romano wrote: > Afaik, pgresult structure and it's fields are not meant to be handled > directly apart of comparing the pointer to null. So if I want to get an integer value with PQgetValue() I don't need to do

Re: [GENERAL] Results interpretation

2017-08-18 Thread Vincenzo Romano
Afaik, pgresult structure and it's fields are not meant to be handled directly apart of comparing the pointer to null. -- Vincenzo Romano - NotOrAnd.IT Information Technologies -- NON QVIETIS MARIBVS NAVTA PERITVS Il 18 ago 2017 19:46, "Igor Korot" ha scritto: > Hi, > I