Thread: Error messages in SQL Query window

Error messages in SQL Query window

From
Raphaël Enrici
Date:
Hi,

before I borrow everybody here with a bug report I have in Debian, can
one of you confirm that error messages displayed under the SQL query
window are generated by the PostgreSQL backend and not by pgAdmin III ?

Regards,
Raphaël

Re: Error messages in SQL Query window

From
Andreas Pflug
Date:
Raphaël Enrici wrote:

> can one of you confirm that error messages displayed under the SQL
> query window are generated by the PostgreSQL backend and not by
> pgAdmin III ?


That's correct, everything in the message tab and in case of problems in
the status line is from the backend.

Regards,
Andreas



Bug#257117 Re: Error messages in SQL Query window

From
Raphaël Enrici
Date:
Hi Andreas,

hope I won't mess you with a known one...

Andreas Pflug wrote:

> Raphaël Enrici wrote:
>
>> can one of you confirm that error messages displayed under the SQL
>> query window are generated by the PostgreSQL backend and not by
>> pgAdmin III ?
>
>
> That's correct, everything in the message tab and in case of problems
> in the status line is from the backend.

Ok,
Ricardo Pérez López (CCed) reported a strange behaviour about two days
ago concerning error messages not displayed at all while using a
es_ES@euro locale under debian. The detail of the bug can be found here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257117

The problem appears while playing with locales and trying to query a non
existent table:
select * from doesnotexist; in the SQL Query window.

Here is where I am with it:
a)
put lc_messages=es_ES@euro in postgresql.conf
export LC_ALL=POSIX ; /etc/init.d/postgresql restart
open a new terminal without changing anything to you normal locale
settings, launch pgadmin3 and retry your test... The error message
should appear correctly in spanish.
b)
leave es_ES@euro in postgresql.conf then do this
export LC_ALL=es_ES@euro ; /etc/init.d/postgresql restart
open a new terminal without changing anything to you normal locale
settings, launch pgadmin3 and retry your test... The error message *DOES
NOT* appear correctly in spanish.

What makes me think it is not a backend bug is that everything runs well
if I do the same thing with psql (I mean I have the expected error
message in Spanish). The problem seems to occur only in pgAdmin III.

I've tried a recent snapshot with no luck. Nothing particular in
pgAdmin3 logs.

It seems something is broken somewhere but I can't discover what and
where. Can someone reproduce this on another distro ? Any further idea ?

Regars,
Raphaël

Re: Bug#257117 Re: Error messages in SQL Query

From
Raphaël Enrici
Date:
Ricardo just sent me an email where saying the problem also appears in psql:

a) leave lc_messages = 'es_ES@euro'; export LC_ALL=es_ES@euro ;
/etc/init.d/postgresql restart
:~ > psql xxx
Contraseña:
Bienvenido a psql 7.4.3, el terminal interactivo de PostgreSQL.

Digite:  \copyright para ver los términos de distribución
        \h para obtener ayuda sobre comandos SQL
        \? para obtener ayuda sobre comandos internos
        \g o termine con punto y coma (;) para ejecutar consulta
        \q para salir
xxx=# select * from non_existent;
ERROR:  ERRORDATA_STACK_SIZE exceeded
xxx=#

I can't reproduce this one, but it seems there is a problem with the
backend. To determine if it's debian specific or not, can someone test
what's described below on another linux distro with PostgreSQL 7.4.3 ?

Cheers,
Raphaël

Raphaël Enrici wrote:

> Hi Andreas,
>
> hope I won't mess you with a known one...
>
> Andreas Pflug wrote:
>
>> Raphaël Enrici wrote:
>>
>>> can one of you confirm that error messages displayed under the SQL
>>> query window are generated by the PostgreSQL backend and not by
>>> pgAdmin III ?
>>
>>
>>
>> That's correct, everything in the message tab and in case of problems
>> in the status line is from the backend.
>
>
> Ok,
> Ricardo Pérez López (CCed) reported a strange behaviour about two days
> ago concerning error messages not displayed at all while using a
> es_ES@euro locale under debian. The detail of the bug can be found here:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257117
>
> The problem appears while playing with locales and trying to query a
> non existent table:
> select * from doesnotexist; in the SQL Query window.
>
> Here is where I am with it:
> a)
> put lc_messages=es_ES@euro in postgresql.conf
> export LC_ALL=POSIX ; /etc/init.d/postgresql restart
> open a new terminal without changing anything to you normal locale
> settings, launch pgadmin3 and retry your test... The error message
> should appear correctly in spanish.
> b)
> leave es_ES@euro in postgresql.conf then do this
> export LC_ALL=es_ES@euro ; /etc/init.d/postgresql restart
> open a new terminal without changing anything to you normal locale
> settings, launch pgadmin3 and retry your test... The error message
> *DOES NOT* appear correctly in spanish.
>
> What makes me think it is not a backend bug is that everything runs
> well if I do the same thing with psql (I mean I have the expected
> error message in Spanish). The problem seems to occur only in pgAdmin
> III.



Re: Bug#257117 Re: Error messages in SQL Query

From
Andreas Pflug
Date:
Raphaël Enrici wrote:

> Ricardo just sent me an email where saying the problem also appears in
> psql:
>
>
> xxx=# select * from non_existent;
> ERROR:  ERRORDATA_STACK_SIZE exceeded
> xxx=#


So that's obviously a backend problem, and this stuff should go to
pgsql-bugs. Maybe a corrupted es_ES translation file.


Regards,
Andreas



Re: Bug#257117 Re: Error messages in SQL Query

From
Raphaël Enrici
Date:
Andreas Pflug wrote:

> Raphaël Enrici wrote:
>
>> Ricardo just sent me an email where saying the problem also appears
>> in psql:
>>
>>
>> xxx=# select * from non_existent;
>> ERROR:  ERRORDATA_STACK_SIZE exceeded
>> xxx=#
>
>
>
> So that's obviously a backend problem, and this stuff should go to
> pgsql-bugs. Maybe a corrupted es_ES translation file.

Thank you Andreas, we have found a workaround with Ricardo so that he
can use his db correctly. We will move to the correct lists or Debian
bug system to report this one.

Regards,
Raphaël

Re: Bug#257117 Re: Error messages in SQL Query

From
Raphaël Enrici
Date:
Raphaël Enrici wrote:

> Andreas Pflug wrote:
>
>> Raphaël Enrici wrote:
>>
>>> Ricardo just sent me an email where saying the problem also appears
>>> in psql:
>>>
>>>
>>> xxx=# select * from non_existent;
>>> ERROR: ERRORDATA_STACK_SIZE exceeded
>>> xxx=#
>>
>>
>> So that's obviously a backend problem, and this stuff should go to
>> pgsql-bugs. Maybe a corrupted es_ES translation file.
>
>
> Thank you Andreas, we have found a workaround with Ricardo so that he
> can use his db correctly. We will move to the correct lists or Debian
> bug system to report this one.


Sorry to insist, but I'd like to come back on this...

To get the ERRORDATA_STACK_SIZE in psql it's mandatory to do one more
thing than in pgAdmin III.
I mean pgAdmin gets in error in situation where psql does not... Maybe
there is something else hidden far far far [(c) schrek2 ;)] ?

Here is where I am:

As root:
put lc_messages to es_ES in postgresql.conf
export LC_CTYPE=es_ES # LC_CTYPE, not LC_MESSAGES, or fr_FR, or
something not C, not POSIX, not xxx.UTF-8
/etc/init.d/postgresql restart

then in another terminal with locales set to POSIX as a normal user:
ralph@anacond:~$ pgadmin3 => DOES NOT WORK CORRECTLY
ralph@anaconda:~$ psql -d pipo2
Welcome to psql 7.4.3, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

pipo2=# \encoding
UNICODE
pipo2=# select * from doesnotexist;
ERROR: no existe la relaci�n "doesnotexist" ========> SO IT WORKS!
pipo2=# \encoding LATIN9 # IS IT REALLY MEANINGFUL TO DO SUCH A THING ???
pipo2=# select * from doesnotexist;
ERROR: ERRORDATA_STACK_SIZE exceeded ========> NOW IT DOES NOT WORK.
pipo2=#

So, I have to change my encoding to LATIN9 so that psql does not work
when pgadmin3 does not work at all.
As far as I've seen in pgadmin.log, the encoding selected by pga3 is
UNICODE as expected...

Any idea ? Is it worth investigating more ?

Regards,
Raphaël



Re: Bug#257117 Re: Error messages in SQL Query

From
Andreas Pflug
Date:
Raphaël Enrici wrote:

>
>
> Sorry to insist, but I'd like to come back on this...
>
> To get the ERRORDATA_STACK_SIZE in psql it's mandatory to do one more
> thing than in pgAdmin III.

Might be because of Unicode, or an additional backend side problem.
Anyhow, this must be examined on pgsql-hackers. We certainly don't like
stack problems while reporting errors.

Regards,
Andreas