dbTalk Databases Forums  

[BUGS] BUG #2139: Problem when calling functions without any argument

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2139: Problem when calling functions without any argument in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jacques Gollion
 
Posts: n/a

Default [BUGS] BUG #2139: Problem when calling functions without any argument - 01-03-2006 , 12:32 PM







The following bug has been logged online:

Bug reference: 2139
Logged by: Jacques Gollion
Email address: jgollion (AT) sambatechnologies (DOT) com
PostgreSQL version: 8.1.1
Operating system: Windows 2000
Description: Problem when calling functions without any argument
Details:

have have written some functions without any argument. When my powerbuilder
V9 application calls these functions, the behaviour is different :

*Using ODBC driver, it works well
*Using JDBC driver (I tried several versions), I get the error message
"ERROR : Syntax error at or near $1. If I add a unused argument to the
function; it works.
If I call in JDBC the same function for Oracle or Sybase, it works.
If I call other PostGreSQL functions with arguments, it works.

Where am I wrong ?

Thanks in advance for your help.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Jaime Casanova
 
Posts: n/a

Default Re: [BUGS] BUG #2139: Problem when calling functions without any argument - 01-03-2006 , 02:47 PM






On 1/3/06, Jacques Gollion <jgollion (AT) sambatechnologies (DOT) com> wrote:
Quote:
The following bug has been logged online:

Bug reference: 2139
Logged by: Jacques Gollion
Email address: jgollion (AT) sambatechnologies (DOT) com
PostgreSQL version: 8.1.1
Operating system: Windows 2000
Description: Problem when calling functions without any argument
Details:

have have written some functions without any argument. When my powerbuild=
er
V9 application calls these functions, the behaviour is different :

*Using ODBC driver, it works well
*Using JDBC driver (I tried several versions), I get the error message
"ERROR : Syntax error at or near $1. If I add a unused argument to the
function; it works.
If I call in JDBC the same function for Oracle or Sybase, it works.
If I call other PostGreSQL functions with arguments, it works.

Where am I wrong ?

Thanks in advance for your help.

and... where is the function? how is defined? how do you use it?

code, please wiyhout that you can't expect any help...

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator

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


Reply With Quote
  #3  
Old   
Jay Grubb
 
Posts: n/a

Default Re: BUG #2139: Problem when calling functions without any argument - 01-05-2006 , 02:17 PM




Jaime Casanova wrote:
Quote:
On 1/3/06, Jacques Gollion <jgollion (AT) sambatechnologies (DOT) com> wrote:

The following bug has been logged online:

Bug reference: 2139
Logged by: Jacques Gollion
Email address: jgollion (AT) sambatechnologies (DOT) com
PostgreSQL version: 8.1.1
Operating system: Windows 2000
Description: Problem when calling functions without any argument
Details:

have have written some functions without any argument. When my powerbuild=
er
V9 application calls these functions, the behaviour is different :

*Using ODBC driver, it works well
*Using JDBC driver (I tried several versions), I get the error message
"ERROR : Syntax error at or near $1. If I add a unused argument to the
function; it works.
If I call in JDBC the same function for Oracle or Sybase, it works.
If I call other PostGreSQL functions with arguments, it works.

Where am I wrong ?

Thanks in advance for your help.


and... where is the function? how is defined? how do you use it?

code, please wiyhout that you can't expect any help...

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Yup, need some examples. Remember though that ODBC, JDBC, and native
Postgresql are different dialects, with some differences in
implementation. My guess is that the Postgresql has a return value,
JDBC detects it, and really wants a placeholder for it and ODBC
didn't. Note also that each DB can have some different syntaxes,
capabilities and conventions.

ODBC/JDBC can reduce significantly the differences. They both have
some escape sequences that can help, but are not the same as the ANSI
Sql.

Jay Grubb
Technical Consultant
OpenLink Software
Web: http://www.openlinksw.com:
Product Weblogs:
Virtuoso: http://www.openlinksw.com/weblogs/virtuoso
UDA: http://www.openlinksw.com/weblogs/uda
Universal Data Access & Virtual Database Technology Providers



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.