Re: [JDBC] Patch for doc/jdbc.sgml
Your patch has been added to the PostgreSQL unapplied patches list at: http://candle.pha.pa.us/cgi-bin/pgpatches I will try to apply it within the next 48 hours. > Hello, > > Attached patch is correction for 'doc/jdbc.sgml' of PostgreSQL 7.1.3. > > Correction content: > * I revised a mistake of type (copy and paste). > * I revised multiplicity of description. > > Please review, > > -- > Ryouichi Matsuda [ Attachment, skipping... ] > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup.| Drexel Hill, Pennsylvania 19026 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [JDBC] Fwd: Re: [GENERAL] unicode in 7.1
On Tue, Sep 11, 2001 at 11:39:38AM -0700, Culley Harrelson wrote: > Ack! I guess I am hitting this problem > > I had my database rebuilt to use UNICODE encoding. Data now appears > correctly in pgsql but not when filtered through JDBC. Unfortunately Im > using the open source DbConnectionBroker connection pooling object and I > have to dig into this to apply the fix. It is suprising to me that JDBC > has a problem with a database using UNICODE encoding?!? I obviously don't > understand the internals of this stuff With UNICODE you are claiming to JDBC 'hey, my data is UNICODE (UTF8)'. What encoding the data fields really are? -- marko ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [JDBC] Fwd: Re: [GENERAL] unicode in 7.1
Culley, What do you get when you issue the following select statements: select getdatabaseencoding(); select datname, encoding from pg_database; thanks, --Barry Culley Harrelson wrote: > Ack! I guess I am hitting this problem > > I had my database rebuilt to use UNICODE encoding. Data now appears > correctly in pgsql but not when filtered through JDBC. Unfortunately Im > using the open source DbConnectionBroker connection pooling object and I > have to dig into this to apply the fix. It is suprising to me that JDBC > has a problem with a database using UNICODE encoding?!? I obviously > don't understand the internals of this stuff > > culley > > > At 10:06 AM 9/11/01 -0700, you wrote: > >> Culley, >> >> With out more details of your setup, I can't give you a complete >> answer. But check out the info at: >> >> http://lab.applinet.nl/postgresql-jdbc/#CharacterEncoding >> >> for a brief discussion of what I believe is your problem. There has >> also been a number of discussions on this on the pgsql-jdbc mail list. >> You might also want to check the mail archives. >> >> thanks, >> --Barry >> >> >> Culley Harrelson wrote: >> >>> The was corrupted in the process of the upgrade. >>> Is there some way to tell what the configuration options were when it >>> was installed? I am assuming by API you mean how am I accessing >>> Postgres? JDBC. >>> Culley >>> X-Apparently-To: [EMAIL PROTECTED] via web9605; 10 Sep 2001 18:19:26 -0700 (PDT) X-Track: 1: 40 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] unicode in 7.1 X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.1 =?iso-2022-jp?B?KBskQjAqGyhCKQ==?= Date: Tue, 11 Sep 2001 10:19:00 +0900 From: Tatsuo Ishii <[EMAIL PROTECTED]> X-Dispatcher: imput version 2228(IM140) Lines: 9 > my isp recently upgraded form postgreSQL 7.0 to 7.1. It went pretty well > but I just discovered that non-english characters are now in the database > as a question mark-- inserting non-english characters produces a ? as > well. Any idea what has gone wrong and what we need to do to fix this? Hard to tell without knowing what the configuration option was and what kind of API you are using... -- Tatsuo Ishii >>> >>> >>> _ >>> Do You Yahoo!? >>> Get your free @yahoo.com address at http://mail.yahoo.com >>> >>> ---(end of broadcast)--- >>> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] >> > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [HACKERS] [JDBC] Troubles using German Umlauts with JDBC
No this isn't a locale issue. This is a character set issue. Java is unicode based. Therefore it needs to convert data it receives from the server into unicode. In order to do this, it needs to know the character set that the server is sending back the data in. Locale issues like collation sequences, date formats, etc. are unrelated to this specific issue. thanks, --Barry Bruce Momjian wrote: > Can I ask, isn't this the meaning if locale? Is the problem that we > need locale capability in jdbc? We have a --enable-locale configure > option. > > > > >>Is this a jdbc issue or a general backend issue? >> >> >> >>>Bruce, >>> >>>I think the TODO item should be: >>> >>>Ability to set character set for a database without multibyte enabled >>> >>>Currently createdb -E (and the corresponding create database sql >>>command) only works if multibyte is enabled. However it is useful to >>>know which single byte character set is being used even when multibyte >>>isn't enabled. Currently there is no way to specify which single byte >>>character set a database is using (unless you compile with multibyte). >>> >>>thanks, >>>--Barry >>> >>> >>>Bruce Momjian wrote: >>> I can add something if people agree there is an issue here. >I've added a new section "Character encoding" to >http://lab.applinet.nl/postgresql-jdbc/, based on the >information from Dave and Barry. > >I haven't seen a confirmation from pgsql-hackers or Bruce yet >that this issue will be added to the Todo list. I'm under the >impression that the backend developers don't see this as a >problem. > >Regards, >Ren? Pijlman > >On Tue, 04 Sep 2001 10:40:36 -0700, Barry Lind wrote: > > >>I would like to add one additional comment. In current sources the jdbc >>driver detects (through a hack) that the server doesn't have multibyte >>enabled and then ignores the SQL_ASCII return value and defaults to the >>JVM's character set instead of using SQL_ASCII. >> >>The problem boils down to the fact that without multibyte enabled, the >>server has know way of specifiying which 8bit character set is being >>used for a particular database. Thus a client like JDBC doesn't know >>what character set to use when converting to UNICODE. Thus the best we >>can do in JDBC is use our best guess (JVM character set is probably the >>best default), and allow the user to explicitly specify something else >>if necessary. >> >>thanks, >>--Barry >> >>Rene Pijlman wrote: >> >> >>>[forwarding to pgsql-hackers and Bruce as Todo list maintainer, >>>see comment below] >>> >>>[insert with JDBC converts Latin-1 umlaut to ?] >>>On 04 Sep 2001 09:54:27 -0400, Dave Cramer wrote: >>> >>> >>> You have to set the encoding when you make the connection. Properties props = new Properties(); props.put("user",user); props.put("password",password); props.put("charSet",encoding); Connection con = DriverManager.getConnection(url,props); where encoding is the proper encoding for your database >>>For completeness, I quote the answer Barry Lind gave yesterday. >>> >>>"[the driver] asks the server what character set is being used >>>for the database. Unfortunatly the server only knows about >>>character sets if multibyte support is compiled in. If the >>>server is compiled without multibyte, then it always reports to >>>the client that the character set is SQL_ASCII (where SQL_ASCII >>>is 7bit ascii). Thus if you don't have multibyte enabled on the >>>server you can't support 8bit characters through the jdbc >>>driver, unless you specifically tell the connection what >>>character set to use (i.e. override the default obtained from >>>the server)." >>> >>>This really is confusing and I think PostgreSQL should be able >>>to support single byte encoding conversions without enabling >>>multi-byte. >>> >>>To the very least there should be a --enable-encoding-conversion >>>or something similar, even if it just enables the current >>>multibyte support. >>> >>>Bruce, can this be put on the TODO list one way or the other? >>>This problem has appeared 4 times in two months or so on the >>>JDBC list. >>> >>>Regards, >>>Ren? Pijlman <[EMAIL PROTECTED]> >>> >---(end of broadcast)--- >TIP 6: Have you searched our list archives? > >http://www.postgresql.org/search.mpl > > > >>> >>> >>>---(end of broadcast)--- >>>TIP 2: you can get off all lists at once with the unregister command >>>(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) >>> >>> >>-- >> Bruce Momjian
Re: [JDBC] no suitable driver
Thanks Michael & Antonio! >your URL is missing a colon Adding the missing colon took care of the problem & got my demo back on line with just 15 minutes to spare before the "business day" begins... If I were running a commercial database, I'd still be waiting for the tech support folks to wander into their office so they could promise to return my call later! The open source community is great! -Nick - Nick Fankhauser Business: [EMAIL PROTECTED] Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/ Personal: [EMAIL PROTECTED] http://www.fankhausers.com ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [JDBC] no suitable driver
> Then I changed the dbUrl string to: > > private static final String dbUrl = > "jdbc:postgresql//wetwang.ontko.com/demo"; > > Any thoughts about what I've done wrong here? This might not be the only problem, but your URL is missing a colon, should be: jdbc:postgresql://wetwang.ontko.com/demo Michael xxx ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[JDBC] no suitable driver
Hi- I am getting the error message "no suitable driver" from a Tomcat application that used to work. The change that I made to cause this is that I originally accessed my database on the same server, but decided to change the URL to point my application at a database residing on another server. (Because I killed the DB horribly on the local server... but that's another story, which is told on the pgsql-admin list...) Here's a snip of what my connection looked like when it worked: private static final String driver = "org.postgresql.Driver"; private static final String user= "www-data"; private static final String pass = ""; private static final String dbUrl = "jdbc:postgresql:demo"; . . . try { Class.forName(driver); connection = DriverManager.getConnection(dbUrl, user, pass); Then I changed the dbUrl string to: private static final String dbUrl = "jdbc:postgresql//wetwang.ontko.com/demo"; After recompiling & restarting my tomcat app with *no other changes*, I started getting the "no suitable driver" message. Any thoughts about what I've done wrong here? Thanks! -Nick - Nick Fankhauser [EMAIL PROTECTED] Phone 1.765.965.7363 Fax 1.765.962.9788 doxpop - Court records at your fingertips - http://www.doxpop.com/ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[JDBC] Patch for doc/jdbc.sgml
Hello, Attached patch is correction for 'doc/jdbc.sgml' of PostgreSQL 7.1.3. Correction content: * I revised a mistake of type (copy and paste). * I revised multiplicity of description. Please review, -- Ryouichi Matsuda jdbc.sgml.diff ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]