Display of error message (was: Re: Re : Crashing v1.6.2 with a syntax error)

From: Erwin Brandstetter <brandstetter(at)falter(dot)at>
To: pgadmin-support(at)postgresql(dot)org
Cc: laurent_roche(at)yahoo(dot)com
Subject: Display of error message (was: Re: Re : Crashing v1.6.2 with a syntax error)
Date: 2007-02-25 20:19:57
Message-ID: 45E1EF6D.9010808@falter.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi developers! Hi Laurent!

laurent_roche(at)yahoo(dot)com wrote:
> Hello Erwin,
>
> I am interested in the part "I get an error message with only the error code".
>
> I have the same problem, however in the rest of your message you do have an error message with the error code
> " FEHLER: Fehler »Syntaxfehler« bei »loc«
> SQL state: 42601
> Character: 1"
>
> How do you achieve this ?
>
> My problem is that, if my database is in UTF-8, I will not get any error messages, just the code.
> Is that the same for you ? Have you found a solution to have an error message ?
> So far we have not been able to reproduce this error: it seems its due to my PG server configuration (Ubuntu with French locale), other configurations (including on WinXP machine) work fine.
>
> ----- Message d'origine ----
> De : Erwin Brandstetter <brandstetter(at)falter(dot)at>
> À : pgadmin-support(at)postgresql(dot)org
> Envoyé le : Mercredi, 21 Février 2007, 2h06mn 21s
> Objet : [pgadmin-support] Crashing v1.6.2 with a syntax error
(...)
> Look at the following query:
> select * from loc where loc like 'a%' loc = 'b';
> Note the syntax error: "and" is missing in the WHERE clause. If I run
> this from the SQL query dialogue window I get an error message with only
> the error code - but that has been reported before.
>
> FEHLER: Fehler »Syntaxfehler« bei »loc«
> SQL state: 42601
> Character: 1

Laurent, I was not aware that you were the one to report the problem
with missing error messages in the first place.
In the new Windows version Dave has compiled from SVN I still get a
number instead of additional additional information:
(Using the faulty query from above: select * from loc where loc like
'a%' loc = 'b'; )

FEHLER: Fehler »Syntaxfehler« bei »loc«
SQL state: 42601
Character: 39

Laurent, is that what you see, too?
Actually, the error message IS shown in my case. Only, I get a number
instead of an additional line of explanation which psql would display.
That would not be by design, would it?

pgAdmin v1.4.3 only gave ponly 1 line:
FEHLER: Fehler »Syntaxfehler« bei »loc« at character 39

psql (v8.1.8):
event=# select * from loc where loc like 'a%' loc = 'b';
FEHLER: Fehler »Syntaxfehler« bei »loc« at character 39
ZEILE 1: select * from loc where loc like 'a%' loc = 'b';
^
psql (v8.2.1):
event=# select * from loc where loc like 'a%' loc = 'b';
FEHLER: Fehler »Syntaxfehler« bei »loc«
LINE 1: select * from loc where loc like 'a%' loc = 'b';
^
(On a sidenote: I am surprised psql gives English "LINE 1:" instead of
"German "ZEILE 1:", as lc_messages = 'de_AT.UTF-8')

Changing the user language in the pgadmin options to German or English
has no effect on the issue (except for changing the language, of course).

Some of my setup data (if needed):

Server 1, PG 8.1.8 on Debian Sarge:
===================================

select version();
PostgreSQL 8.1.8 on i386-pc-linux-gnu, compiled by GCC cc (GCC)
3.3.5 (Debian 1:3.3.5-13)

show client_encoding;
UNICODE

SELECT pg_catalog.pg_encoding_to_char(d.encoding)
FROM pg_catalog.pg_database d JOIN pg_catalog.pg_roles r ON d.datdba = r.oid
WHERE d.datname = 'event';
UTF8

From my postgresql.conf:
datestyle = 'ISO,European'
lc_messages = 'de_AT(dot)utf8(at)euro'
lc_monetary = 'de_AT(dot)utf8(at)euro'
lc_numeric = 'de_AT(dot)utf8(at)euro'
lc_time = 'de_AT(dot)utf8(at)euro'

From the server OS (should be irrelevant!)
postgres(at)dbneu:~$ locale
LANG=de_AT(dot)UTF-8(at)euro
{all LC_* variables}="de_AT(dot)UTF-8(at)euro"

Server 2, PG 8.2.3 on Debian Etch:
==================================

select version();
PostgreSQL 8.2.3 on i486-pc-linux-gnu, compiled by GCC cc (GCC)
4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

show client_encoding;
UNICODE

SELECT pg_catalog.pg_encoding_to_char(d.encoding)
FROM pg_catalog.pg_database d JOIN pg_catalog.pg_roles r ON d.datdba = r.oid
WHERE d.datname = 'event';
UTF8

From my postgresql.conf:
datestyle = 'iso, ymd'
lc_messages = 'de_AT.UTF-8'
lc_monetary = 'de_AT.UTF-8'
lc_numeric = 'de_AT.UTF-8'
lc_time = 'de_AT.UTF-8'

From the server OS (should be irrelevant!)
postgres(at)tester:~$ locale
LANG=de_AT.UTF-8
{all LC_* variables}="de_AT.UTF-8"

Client: pgAdmin III v1.6.3 rev: 5941M on Win XP (SP2)
========================================

I will happily provide more data if needed.

Regards
Erwin

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2007-02-25 22:51:05 Re: pgadmin as main postgresql GUI interface
Previous Message Laurent ROCHE 2007-02-25 18:48:00 Re : pgadmin as main postgresql GUI interface