Re: [JDBC] Accents bug ?

2001-10-02 Thread Denis Bucher
At 20:09 01.10.01 -0400, you wrote: Hello ! >It sounds like an encoding problem. You can check the encoding of the db >by using \encoding in psql. > >There is a section in the docs on this >http://www.postgresql.org/idocs/index.php?multibyte.html Yes I read it, but it didn't help me much, I als

Re: [JDBC] Accents bug ?

2001-10-02 Thread Rene Pijlman
On Mon, 1 Oct 2001 20:09:45 -0400, you wrote: >It sounds like an encoding problem. You can check the encoding of the db >by using \encoding in psql. > >There is a section in the docs on this >http://www.postgresql.org/idocs/index.php?multibyte.html And more on http://lab.applinet.nl/postgresql-jd

Re: [JDBC] Accents bug ?

2001-10-02 Thread Denis Bucher
At 11:48 02.10.01 +0200, Rene Pijlman wrote: Hello ! > >It sounds like an encoding problem. You can check the encoding of the db > >by using \encoding in psql. > >There is a section in the docs on this > >http://www.postgresql.org/idocs/index.php?multibyte.html > >And more on >http://lab.appline

[JDBC] FW: Errors when building jdbc dirver jar file

2001-10-02 Thread Grant Edwards
> -Original Message- > From: Grant Edwards > Sent: 02 October 2001 12:44 > To: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Subject: Errors when building jdbc dirver jar file > > Hi, > > Need a bit of help please, some config stuff first followed by the error. >

Re: [JDBC] FW: Errors when building jdbc dirver jar file

2001-10-02 Thread Rene Pijlman
You wrote: >> /usr/local/postgresql-7.1.3/src/interfaces/jdbc/org/postgresql/Driver.java >> :199: ';' expected >> [javac] return ${major}; IIRC this disappears when you do 'make clean' first. If that doesn't work, go through the complete setup of the source tree (with ./configure etc.)

Re: [JDBC] TIMESTAMP

2001-10-02 Thread David Siebert
--- Thomas O'Dowd <[EMAIL PROTECTED]> wrote: > Can you post a sample of your code that reproduces > the problem. What > timezone are you in? I think there is a problem with > some timezones > which are on the half hour. Can you post the > exception you get also. > > Tom. > > On Mon, Oct 01, 200

[JDBC] jdbc download jar is corrupted

2001-10-02 Thread Ray Tomlinson
http://jdbc.postgresql.org/download/jdbc7.1-1.2.jar has bad format. Neither winzip nor jar can read the contents. Jar throws an IllegalArgumentException and winzip says: error [C:/jdbc7_1-1_2.jar]: start of central directory not found; Zip file corrupt. Possible cause: file transfer error. C:\>j

[JDBC] are \r \n and \t legal in

2001-10-02 Thread Heitzso
PreparedStatement setString(i, s) i.e. p = connection.preparedStatement("SELECT a FROM b WHERE c = ?"); String s = "hello\t\out\r\nthere\t\t\t\r\n"; p.setString(1, s); Just beating my head against the wall trying to sort out what I'm doing wrong and about to hook up to MS SQL Server via Sprinta

[JDBC] are long strings (500 char?) working?

2001-10-02 Thread Heitzso
I've tried using both PreparedStatement and regular Statement modes with a 450 character string: SELECT response, last_requested FROM dataweb_response_cache WHERE request = 'long string here' and SELECT response, last_requested FROM dataweb_response_cache WHERE request = ? (PreparedStatement fo

[JDBC] jdbc2.0 compliance

2001-10-02 Thread Tanesh Sehgal
Dear sir/madam I am using jdbc6.5-1.2.jar is it jdbc2.0 compliant if not Which version of jdbc postgresqldriver is jdbc2.0 compliance. regards TaneshDo You Yahoo!? Listen to your Yahoo! Mail messages from any phone with Yahoo! by Phone.

[JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Lora Goldston
I am using jdbc7.0-1.2.jar. I am getting a "No class found for unkown" when I use strings in my query statements such as 'Container' seen in the query below. These queries work fine when I use Oracle or MySQL. This looks like a bug to me. I can work around this by explicitly casting t

[JDBC] Errors when building jdbc dirver jar file

2001-10-02 Thread Grant Edwards
Hi, Need a bit of help please, some config stuff first followed by the error. Any info will be greatly appreciated emails can be sent to [EMAIL PROTECTED] or [EMAIL PROTECTED] Regards Grant Edwards * postgresql-7.1.3 * java version "1.3.0_01" Java(TM) 2 Runtime Environme

[JDBC] why would an update only work if done twice?

2001-10-02 Thread C O'Connor
I know this is a mistake I have made, and I am pretty sure it is a mistake that has been occuring ever since I caught an SQL exception (tried to insert value with already existing primary key). At a guess I'd say that the db didn't recover properly because I didn't rollback when i caught that ex

[JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Dave Harkness
Hello all, I just discovered PLpgSQL yesterday (yay!) as we began development of our more robust database backend, but I'm seeing some odd behavior in the use of LOCK TABLE. The problem I'm seeing is that two database transactions, initiated via JDBC, are able to obtain simultaneous exclusive

[JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Dave Harkness
Almost forgot the very important info: PostgreSQL: 7.1.3 JDBC: 7.0-1.2 JDK: 1.3.0_02 Client Platform: Win2k 5.00.2195 sp2 Server Platform: RedHat 7.1 I hadn't realized I was using an old JAR. I've just grabbed the stable 7.1-1.2 and will try again. Peace, Dave ---(end

[JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Dave Harkness
Last one. I just tried it with the 7.1-1.2 JAR with the same results, as expected. Peace, Dave ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Barry Lind
Dave, First off, are you running with autocommit turned off in JDBC? By default autocommit is on, and thus your lock is removed as soon as it is aquired. Secondly, you don't need a table lock, you just need to lock the row between the select and the update. You should use 'select for update

Re: [JDBC] TIMESTAMP

2001-10-02 Thread Barry Lind
OK, this is a known bug. It should be fixed in current sources. Try using the 7.2 driver from the jdbc.postgresql.org website and see if that works correctly for you. If you search the email archives you can find a discussion on this bug. thanks, --Barry David Siebert wrote: > It looks as

Re: [JDBC] are long strings (500 char?) working?

2001-10-02 Thread Barry Lind
Heirzso, There is no limit. What version of the database and jdbc driver are you using? Also, can you turn on database debug so that the server prints out the exact sql statement it is getting from the jdbc client? (this statement will have the bound values from the prepared statement in it

Re: [JDBC] are \r \n and \t legal in

2001-10-02 Thread Barry Lind
They should be. Is the \o a typo below, or are you really trying to send \o? thanks, --Barry Heitzso wrote: > PreparedStatement setString(i, s) > > i.e. > > p = connection.preparedStatement("SELECT a FROM b WHERE c = ?"); > String s = "hello\t\out\r\nthere\t\t\t\r\n"; > p.setString(1, s); >

Re: [JDBC] jdbc2.0 compliance

2001-10-02 Thread Barry Lind
This jar is a jdbc2.0 jar. However, It isn't fully complient with the jdbc2.0 spec. You will see much better complience if you upgrade to 7.1. But even in the forthcomming 7.2, there are some areas where the driver still isn't fully complient. But it is getting better all of the time. Is

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Dave Harkness
At 01:45 PM 10/2/2001, Barry Lind wrote: >Dave, > >First off, are you running with autocommit turned off in JDBC? By default >autocommit is on, and thus your lock is removed as soon as it is aquired. I've tried it with auto-commit ON and OFF. With it off, I've tried it with READ_COMMITTED and

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Tom Lane
Barry Lind <[EMAIL PROTECTED]> writes: > My thoughts as well. If we encounter an 'unknown' type, just return it > as a String. Do you have time to fix this? >> I suppose we could return it as a string when we are in doubt? Is this >> reasonable since there are many other types it should be ret

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Tom Lane
Dave Harkness <[EMAIL PROTECTED]> writes: > The problem I'm seeing is that two database transactions, > initiated via JDBC, are able to obtain simultaneous exclusive table locks > on the same table. Sounds to me like JDBC is feeding all your commands through a single database connection, which

Re: [JDBC] TIMESTAMP

2001-10-02 Thread David Siebert
If you mean the 7.2 beta jdbc driver then I am using it and I still get the same error. Do I need to clear the database? The version of postgres seems old 6.5.2 is the reported version. Any idea how to update it. I am running it on Suse 7.1 And I am not all that hot in Linux. "Yes I know it is off

Re: [JDBC] Accents bug ?

2001-10-02 Thread Knut Forkalsrud
[EMAIL PROTECTED] (Denis Bucher) writes: > At 11:48 02.10.01 +0200, Rene Pijlman wrote: > > >I've heard of conversion problems before, but not of chunking > >the data though. > > Yes, that's the most strange I think :-) I have seen the same thing. It happened to Norwegian characters like æøå.

Re: [JDBC] why would an update only work if done twice?

2001-10-02 Thread Dave Cramer
Caoilte, One thing that would be useful here is the logs from the postgres backend to see what postgres is actually seeing. Is it possible to get a look at the logs. I run code like yours in my applications with no problems Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [JDBC] TIMESTAMP

2001-10-02 Thread David Siebert
It looks as if I blew it when I cut and pasted it. Lets try again. This is the error message. Phone Call PhoneCall(Rs) en:0 Bad Timestamp Format at 19 in 2001-10-01 15:20:06.66-05 and this is the method that generates it. public PhoneCall(ResultSet rs) { int errori=0; try {

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
This is coming back from the backend as type unknown. If the single quotes are removed it works ok? I suppose we could return it as a string when we are in doubt? Is this reasonable since there are many other types it should be returned as? Dave -Original Message- From: [EMAIL PROTECTE

Re: [JDBC] jdbc download jar is corrupted

2001-10-02 Thread Barry Lind
It works fine for me. I can download and unzip the file. Are you still seeing this problem? thanks, --Barry Ray Tomlinson wrote: > http://jdbc.postgresql.org/download/jdbc7.1-1.2.jar has bad format. > Neither winzip nor jar can read the contents. Jar throws an > IllegalArgumentException and

Re: [JDBC] Errors when building jdbc dirver jar file

2001-10-02 Thread Barry Lind
You need to run configure first (with the --with-java option) first, before building the driver. --Barry Grant Edwards wrote: > Hi, > > Need a bit of help please, some config stuff first followed by the error. > Any info will be greatly appreciated emails can be sent to > [EMAIL PROTECTED] o

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Barry Lind
Dave, My thoughts as well. If we encounter an 'unknown' type, just return it as a String. Do you have time to fix this? As a work around using an explicit cast should also work: select container_20_ft_qty AS QTY_OH, 'Container'::text AS NOMENCLATURE from ue_summary_mtmc where uic = 'WAQJAA'

Re: [JDBC] TIMESTAMP

2001-10-02 Thread Barry Lind
David, Can you specify the exact error you are getting? along with the database version, jdbc version and java version you are running? Also a test case that demonstrates the problem would be very helpful as well. thanks, --Barry David Siebert wrote: > I am having problems with getTimestamp

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
I tried it on a table which id was an int Using "select 'id' as xxx from ..." Returns xxx as an unknown type Using "select id as xxx from... " returns xxx as an int I have no idea how the backend handles this, but if it can figure it out in one instance why can't it figure it out when I put sin

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Dave Harkness
Barry, Tom, et al, Thanks for your help. I really appreciate it. Okay, I changed the PLpgSQL function to use select for update rather than locking the table explicitly. Now I'm getting different errors. Running in auto-commit and read-committed modes, I am seeing the same error as before: thr

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Tom Lane
"Dave Cramer" <[EMAIL PROTECTED]> writes: > I tried it on a table which id was an int > Using "select 'id' as xxx from ..." Returns xxx as an unknown type > Using "select id as xxx from... " returns xxx as an int > I have no idea how the backend handles this, but if it can figure it out > in one i

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Tom Lane
Dave Harkness <[EMAIL PROTECTED]> writes: > Running in serializable mode, I'm getting a Postgres exception: > ERROR: Can't serialize access due to concurrent update Well, in that case my theory about it all being one transaction is wrong; you couldn't get that error without a cross-transact

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via

2001-10-02 Thread Dave Harkness
At 03:29 PM 10/2/2001, Tom Lane wrote: >Once a lock has been grabbed, the *only* way it can be let go is to end >the transaction. That's my understanding as well. >So my new theory is that the JDBC driver is issuing an auto-commit at >points where you're not expecting it. But I'm only issuing

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
As I said, I have no idea how the backend handles it when it is quoted. You mention that it's not a column reference, but it does get data from the id column? Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Tom Lane Sent: October 2, 2001 6:16 PM To

Re: [JDBC] driver fails to handle strings in query statements properly (ignore my last post)

2001-10-02 Thread Dave Cramer
Ok, I need some sleep, now I see what it does, which is probably not what the user wanted, but I have fixed the driver to it doesn't throw an exception. Dave -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Dave Cramer Sent: October 2, 2001 9:12 PM To: '

[JDBC] PROBLEM SOLVED: LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Dave Harkness
At 06:36 PM 10/2/2001, Hiroshi Inoue wrote: >The cause is that the stored function uses a common >snapshot throughout the function execution. As I've >complained many times, the current implementaion is >far from intuition and this case seems to show that >it isn't proper at all either. Bravo! Th

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Hiroshi Inoue
Dave Harkness wrote: > > At 01:45 PM 10/2/2001, Barry Lind wrote: > >Dave, > > > >Secondly, you don't need a table lock, you just need to lock the row > >between the select and the update. You should use 'select for update' to > >do this. That way when you issue the select to get the current val

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Barry Lind
Dave, I don't know why you are seeing these problems with the lock table. But the select for update should work for you. (In my product I have done exactly the same thing you are trying to do using select for update with success). I would add one minor comment on your description of the beh

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via JDBC

2001-10-02 Thread Barry Lind
Dave, I can't explain what is happening here. I think the best next step is to turn on query logging on the server and look at the actual SQL statements being executed. It really looks like some extra commits or rollbacks are occuring that is causing the locks to be released. thanks, --Barr

Re: [JDBC] LOCK TABLE oddness in PLpgSQL function called via

2001-10-02 Thread Dave Harkness
At 02:22 PM 10/2/2001, Tom Lane wrote: >Dave Harkness <[EMAIL PROTECTED]> writes: > > The problem I'm seeing is that two database transactions, > > initiated via JDBC, are able to obtain simultaneous exclusive table locks > > on the same table. > >Sounds to me like JDBC is feeding all your command

Re: [JDBC] driver fails to handle strings in query statements properly

2001-10-02 Thread Dave Cramer
Ok, sounds good, I have time and will take care of it. Dave -Original Message- From: Barry Lind [mailto:[EMAIL PROTECTED]] Sent: October 2, 2001 4:21 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: driver fails to handle strings in query statements properly Dave, My thoug