Re: Re: PQexec problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: François LODIER <zentak(at)agisphere(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: PQexec problem
Date: 2001-01-04 16:39:12
Message-ID: 21927.978626352@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?Q?Fran=E7ois?= LODIER <zentak(at)agisphere(dot)com> writes:
> When I try to connect to my data base, a query is done and has a strange
> form. There follows my logs :

> FindExec: found "/usr/lib/postgresql/bin/postgres" using argv[0]
> debug info:
> User = postgres
> RemoteHost = 192.168.1.168
> RemotePort = 3881
> DatabaseName = qmail
> Verbose = 2
> Noversion = f
> timings = f
> dates = European
> bufsize = 128
> sortmem = 512
> query echo = t
> InitPostgres
> query: x33(
> ERROR: parser: parse error at or near "x3"
> AbortCurrentTransaction

> So if anybody could explain me why this stuff is doing this, it would be
> great !

If you look into src/interfaces/libpq/fe-connect.c, you'll see that as
soon as the frontend libpq has established a connection, it sends a few
SET commands to set things like timezone and datestyle based on
client-side environment variables. I think something must be hosed in
that logic, but I'm not sure what. Try adding a few printf's in there
or stepping through it with a debugger to see what's going wrong.

Also, if you are using psql, it sends a command or two as soon as libpq
comes back; it's possible that the broken query is coming from there.
Again though, it's hard to see what could be going wrong. (You could
try starting psql with -E switch to see what it thinks it's sending.)

Keep us posted what you find out ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Smith 2001-01-04 16:55:14 Re: Doesn't use index, why?
Previous Message Blake Crosby 2001-01-04 16:23:44 Time Zone Query