PGSQL and NPGSQL does not display exact errors

Started by RPKalmost 19 years ago3 messages
#1RPK
rohitprakash123@indiatimes.com

PGSQL and NPGSQL does not display exact error while using with VB.NET. We
faced a lot of trouble to find out actually where an error occured.

For example in a routine we need to insert a record to the table. I forgot
to use "values" clause in the Insert Query, but PGSQL displayed error "No
source code available" in the routine where we opened the connection.
Whereas, Oracle displayed exact error that "Invalid Insert statement".

There are many such situation where we remained puzzled and later found
error somewhere else.

--
View this message in context: http://www.nabble.com/PGSQL-and-NPGSQL-does-not-display-exact-errors-tf3286839.html#a9142659
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.

#2Joshua D. Drake
jd@commandprompt.com
In reply to: RPK (#1)
Re: PGSQL and NPGSQL does not display exact errors

RPK wrote:

PGSQL and NPGSQL does not display exact error while using with VB.NET. We
faced a lot of trouble to find out actually where an error occured.

For example in a routine we need to insert a record to the table. I forgot
to use "values" clause in the Insert Query, but PGSQL displayed error "No
source code available" in the routine where we opened the connection.
Whereas, Oracle displayed exact error that "Invalid Insert statement".

There are many such situation where we remained puzzled and later found
error somewhere else.

You should make sure and check the postgresql logs at all times. They
are the definitive source for anything you are trying to do. If
PostgreSQL doesn't report an error, you know the problem is in your code.

Joshua D. Drake

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

#3Hiroshi Saito
z-saito@guitar.ocn.ne.jp
In reply to: RPK (#1)
Re: PGSQL and NPGSQL does not display exact errors

Hi.

Um, I think it is difficult for those messages to be standardized...Certainly different each
DBMS expression makes the user often puzzled. Then, As for each DBMS, the history
of evolution was different. That is, they were not able to share architecture.

Please see the following message.

1.) ORACLE database 10g Express Edition

INSERT INTO saito ('Hiroshi','dummy');

ORA-00928 missing SELECT keyword

2.) SQLServer 2005 Express

INSERT INTO saito ('Hiroshi','dummy')

Incorrect syntax near ')'.

3.) PostgreSQL 8.2.3

INSERT INTO saito ('Hiroshi','dummy');

ERROR: syntax error at or near "'Hiroshi'" at character 20
LINE 1: INSERT INTO saito ('Hiroshi','dummy');
^

Therefore, It is seen the expression that PostgreSQL is the best now when comparing it.

P.S)
BTW, The mailing list of Npgsql is here.
http://pgfoundry.org/mailman/listinfo/npgsql-devel

regards,
Hiroshi Saito

From: "Joshua D. Drake"

Show quoted text

RPK wrote:

PGSQL and NPGSQL does not display exact error while using with VB.NET. We
faced a lot of trouble to find out actually where an error occured.

For example in a routine we need to insert a record to the table. I forgot
to use "values" clause in the Insert Query, but PGSQL displayed error "No
source code available" in the routine where we opened the connection.
Whereas, Oracle displayed exact error that "Invalid Insert statement".

There are many such situation where we remained puzzled and later found
error somewhere else.

You should make sure and check the postgresql logs at all times. They
are the definitive source for anything you are trying to do. If
PostgreSQL doesn't report an error, you know the problem is in your code.

Joshua D. Drake

--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
PostgreSQL Replication: http://www.commandprompt.com/products/

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings