[BUGS] JDBC: 2 bugs: Getting a smallint array actually gets an integer array and return type of a boolean array is bit.

2010-06-29 Thread Saneesh Apte
Hi, I think I found two bugs (and I hope I am not wasting everyone's time). One is minor: the base type of a boolean[] is java.sql.Types.BIT instead or java.sql.Types.BOOLEAN. At the very least shouldn't these be aliases for the same type? And secondly the returned type from a

[BUGS] Function works in 8.4 but not in 9.0 beta2 ERROR: structure of query does not match function result type

2010-06-29 Thread Marcel Asio
Hi I've started testing our applications against PostgreSQL 9.0 beta2 and found that this function now does not work anymore(rewritten to be as small and anonymous as possible) CREATE TYPE test_type AS( product text, amount numeric(30,4) ); CREATE FUNCTION test_func() RETURNS SETOF

Re: [BUGS] JDBC: 2 bugs: Getting a smallint array actually gets an integer array and return type of a boolean array is bit.

2010-06-29 Thread Kevin Grittner
Saneesh Apte s...@calccit.org wrote: the base type of a boolean[] is java.sql.Types.BIT instead or java.sql.Types.BOOLEAN. At the very least shouldn't these be aliases for the same type? And secondly the returned type from a smallint[] is an Integer[] instead of a Short[]. Should the

Re: [BUGS] Function works in 8.4 but not in 9.0 beta2 ERROR: structure of query does not match function result type

2010-06-29 Thread Tom Lane
Marcel Asio marcel.a...@redbet.com writes: I've started testing our applications against PostgreSQL 9.0 beta2 and found that this function now does not work anymore(rewritten to be as small and anonymous as possible) CREATE TYPE test_type AS( product text, amount numeric(30,4) );

Re: [BUGS] Function works in 8.4 but not in 9.0 beta2 ERROR: structure of query does not match function result type

2010-06-29 Thread Marcel Asio
Hi Tom, Yes I managed to figured that out, but when was this changed? It was working in 8.4 but not 9.0 and I could not find anything about this in the release notes. On Jun 29, 2010, at 17:32 , Tom Lane wrote: Marcel Asio marcel.a...@redbet.com writes: I've started testing our

Re: [BUGS] BUG #5520: PG unable to find java stored procs without input parameters

2010-06-29 Thread Robert Haas
On Tue, Jun 22, 2010 at 8:30 AM, Peter Mengaziol pmengaz...@electrainfo.com wrote: The following bug has been logged online: Bug reference:      5520 Logged by:          Peter Mengaziol Email address:      pmengaz...@electrainfo.com PostgreSQL version: 8.4.4 Operating system:   OS X

Re: [JDBC] [BUGS] JDBC: 2 bugs: Getting a smallint array actually gets an integer array and return type of a boolean array is bit.

2010-06-29 Thread Kris Jurka
On Mon, 28 Jun 2010, Saneesh Apte wrote: One is minor: the base type of a boolean[] is java.sql.Types.BIT instead or java.sql.Types.BOOLEAN. At the very least shouldn't these be aliases for the same type? These are aliases for the same type. I believe we accept either BOOLEAN or BIT as

Re: [BUGS] Function works in 8.4 but not in 9.0 beta2 ERROR: structure of query does not match function result type

2010-06-29 Thread Tom Lane
Marcel Asio marcel.a...@redbet.com writes: Yes I managed to figured that out, but when was this changed? It was working in 8.4 but not 9.0 and I could not find anything about this in the release notes. The 9.0 release notes are not really up to snuff yet :-(. The only thing in the notes

Re: [BUGS] Function works in 8.4 but not in 9.0 beta2 ERROR: structure of query does not match function result type

2010-06-29 Thread Marcel Asio
I was suspecting that it was incompatibility that hadn't been documented correctly, just wanted to make sure that this was the case. It probably should go into the release notes too since it is bound to affect others Thankfully Marcel Asio Network System Administrator Redbet Technology

Re: [JDBC] [BUGS] JDBC: 2 bugs: Getting a smallint array actually gets an integer array and return type of a boolean array is bit.

2010-06-29 Thread dmp
Hi, I think I found two bugs (and I hope I am not wasting everyone's time). One is minor: the base type of a boolean[] is java.sql.Types.BIT instead or java.sql.Types.BOOLEAN. At the very least shouldn't these be aliases for the same type? And secondly the returned type from a

[BUGS] BUG #5530: Default cost of crypt causes poor decisions

2010-06-29 Thread Baegle
The following bug has been logged online: Bug reference: 5530 Logged by: Baegle Email address: a...@wifiny.org PostgreSQL version: 8.4.4 Operating system: Linux - Ubuntu - Lucid Lynx - 2.6.31-19-generic Description:Default cost of crypt causes poor decisions Details:

Re: [BUGS] Function works in 8.4 but not in 9.0 beta2 ERROR: structure of query does not match function result type

2010-06-29 Thread Tom Lane
Marcel Asio marcel.a...@redbet.com writes: I was suspecting that it was incompatibility that hadn't been documented correctly, just wanted to make sure that this was the case. It probably should go into the release notes too since it is bound to affect others Yeah, done.

Re: [BUGS] BUG #5530: Default cost of crypt causes poor decisions

2010-06-29 Thread Tom Lane
Baegle a...@wifiny.org writes: The default cost of crypt() is 1, but crypt is intentionally a high cost function. This mis-match between assigned cost and actual cost causes the query planner to use crypt too soon and slows down execution of queries significantly. The cost of the function

Re: [JDBC] [BUGS] JDBC: 2 bugs: Getting a smallint array actually gets an integer array and return type of a boolean array is bit.

2010-06-29 Thread Oliver Jowett
Saneesh Apte wrote: I think I found two bugs (and I hope I am not wasting everyone's time). One is minor: the base type of a boolean[] is java.sql.Types.BIT instead or java.sql.Types.BOOLEAN. At the very least shouldn't these be aliases for the same type? Types.BOOLEAN does not