Hi developers! Hi Laurent!

[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]>
À : pgadmin-support@postgresql.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 = '[EMAIL PROTECTED]'
   lc_monetary = '[EMAIL PROTECTED]'
   lc_numeric = '[EMAIL PROTECTED]'
   lc_time = '[EMAIL PROTECTED]'

From the server OS (should be irrelevant!)
   [EMAIL PROTECTED]:~$ locale
   [EMAIL PROTECTED]
   {all LC_* variables}="[EMAIL PROTECTED]"



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!)
   [EMAIL PROTECTED]:~$ 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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to