pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedQuery act different when doing by hand and by using a driver in app
3+ messages / 2 participants
[nested] [flat]
* Query act different when doing by hand and by using a driver in app
@ 2018-09-14 19:11 ik <idokan@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: ik @ 2018-09-14 19:11 UTC (permalink / raw)
To: pgsql-general
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.
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?
Thank you
Ido
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Query act different when doing by hand and by using a driver in app
@ 2018-09-14 21:12 Adrian Klaver <adrian.klaver@aklaver.com>
parent: ik <idokan@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Klaver @ 2018-09-14 21:12 UTC (permalink / raw)
To: ik <idokan@gmail.com>; 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.klaver@aklaver.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Query act different when doing by hand and by using a driver in app
@ 2018-09-15 13:26 ik <idokan@gmail.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 3+ messages in thread
From: ik @ 2018-09-15 13:26 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general
Hi
Thank you for the answer, after a longer tracing, (go based and printing pg
queries to log, I realize that it happens on a different place that I
thought it does.
Ido
On Sat, Sep 15, 2018 at 12:13 AM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:
> 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.klaver@aklaver.com
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-09-15 13:26 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-14 19:11 Query act different when doing by hand and by using a driver in app ik <idokan@gmail.com>
2018-09-14 21:12 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-09-15 13:26 ` ik <idokan@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox