Re: Query act different when doing by hand and by using a driver in app

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: ik <idokan(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Query act different when doing by hand and by using a driver in app
Date: 2018-09-14 21:12:56
Message-ID: de1f444a-339b-8178-e6fc-73a9a6f6455b@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9/14/18 12:11 PM, ik wrote:
> Hello,
>
> Not sure that this is the right mailing list, so sorry from advance.
>
> I have a program that when it does a query I have one raw returns, but
> when I execute the same query with the same conditions, I get the right
> number of rows back.

The above is going to need more information to work out:

1) The query that returns one row is running in a Go program using the
Go driver below, correct?

2) The other query that returns correctly is being run where and how?

3) What is the actual query?

4) How is the query setup in the program?

5) Are you sure the incorrect and correct queries are running against
the same database?

>
> I'm using gonlang and https://github.com/jackc/pgx .
> The query inside is inside an already open cursor of another "select"
> query that I iterate over.
>
> Is there a way to debug just that inside pg-logs without having all
> possible queries logged in?

If it is a SELECT query then no.

>
> Thank you
> Ido

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebastian P. Luque 2018-09-14 21:35:42 column information from view
Previous Message Arup Rakshit 2018-09-14 20:34:22 Bitmap Heap Scan and Bitmap Index Scan