On Sat, 27 Oct 2001 19:25:49 -0500, you wrote:
There seems to be a problem with DatabaseMetaData.getTables()
[...]
It throws a NullPointerException:
This may have been fixed by now:
http://fts.postgresql.org/db/mw/msg.html?mid=1021572
Regards,
René Pijlman [EMAIL PROTECTED]
On Sun, 28 Oct 2001 00:33:07 -0700, you wrote:
I'm used to just doing the insert and catching the SQLCODE -803
on DB2 to know that the row I'm trying to insert already exists.
Is there an easy way to do this using Postgresql and JDBC?
I'm afraid not.
SQLException.getErrorCode() always returns
On Fri, 26 Oct 2001 21:34:37 -0600, you wrote:
I have successfully installed
PostgreSQL on my Mac G4 running Mac OS X 10.1.
I have no experience with this platform, but...
Class.forName(org.postgresql.Driver); returns the error
java.lang.ClassNotFoundException: org.postgresql.Driver.
...
On Wed, 24 Oct 2001 12:58:55 +0200, you wrote:
has anyone made some experience using the jdbc driver jxDBCon for PostgreSQL?
it is an alternative to the driver released by PostgreSQL.
(http://jxdbcon.sourceforge.net)
Its been mentioned a couple of times on this list, but I haven't
seen any
On Sun, 21 Oct 2001 11:37:29 +0900, you wrote:
So I guess what is happening is that the preparedstatement parser
ignores quoted question marks
I hope not. I hope it sets the field to a literal '?' :-)
Regards,
René Pijlman [EMAIL PROTECTED]
---(end of
On 20 Oct 2001 22:34:05 -, you wrote:
PreparedStatement st = db.prepareStatement(UPDATE foo SET ? = '?' +
WHERE number = ?);
Whenever I use this I get a Parameter index out of range error.
I am assuming that what this means is that I can't use a ? as a column
name, but it
On 20 Oct 2001 23:14:22 -, you wrote:
There is a bunch of documentation for prepared statements in PG's
JDBC, it seems that the only thing prepared statements do is throw
exceptions.
I suggest you read some basic JDBC documentation. This is really
not PostgreSQL specific. Checkout
On Thu, 20 Sep 2001 16:24:45 -0400, you wrote:
. failure in TimestampTest (testSetTimestamp) fixed. The failure is
because testSetTimestamp was inserting a timestamp with hour 7 but
checkTimeTest was expecting a timestamp with hour 8. AFAICS, there are
no issues wrt daylight savings time and
You wrote:
Here's the offending loop. BTW, I messed up with the
total number of rows, it's ~6,000,000, not 600,000.
[...]
while(dbResult.next())
Unfortunately, PostgreSQL clients always retrieve the entire
resultset from the server before it is processed by the .next()
loop.
In your case
On Mon, 1 Oct 2001 15:10:04 -0400, you wrote:
now that CLASSPATH is deprecated
Que? Did I miss something?
Regards,
René Pijlman [EMAIL PROTECTED]
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
On Mon, 01 Oct 2001 11:46:27 -0700, you wrote:
The subject pretty much says it all. I have updated the jdbc website to
contain more current information. It certainly could contain more
information, but my primary goal was to get it current. If you have any
suggestions, changes or additions
On Mon, 24 Sep 2001 09:46:49 -0500, you wrote:
PreparedStatement ps = con.prepareStatement(update=
userpreferences set image='?' and time=? where user='?');
I guess the single quotes around the question mark placeholder
are the cause of your problem.
Regards,
René Pijlman [EMAIL
Attached is a patch that fixes ResultSetMetaData.isNullable() in
the JDBC driver.
This method is currently unimplemented and always returns
ResultSetMetaData.columnNullable. This is obviously incorrect
when a column is defined with NOT NULL or PRIMARY KEY. And we
have to think of check
On 13 Sep 2001 22:58:23 -0500, you wrote:
I have a schema data from Oracle that uses a 'fake' boolean column.
(Stupid oracle doesn't support type boolean afaik - uses number). I
find the easiest way to adapt the schema data to postgresql is to
*not* convert the 'fake' boolean fields (enforced
On Fri, 14 Sep 2001 11:22:53 +0200, you wrote:
Because the 1 features is not suppossed to be in the spécification
I think it is. See my other posting.
To be more precise: the int-boolean mapping is in the spec, but
the spec doesn't say how int values should be mapped to true and
false.
You wrote:
I can see that very long transaction are not supported.
Where or how did you see that?
As far as transaction is concerned, my question was if there is any limit
to the number of statements (select/insert/update) that can be
in one single transaction.
Is is possible postgresql
[JDBC driver ignores catalog and schema]
On Fri, 07 Sep 2001 09:58:36 -0400, Tom Lane wrote:
I think it'd be a mistake to expend much effort on this issue in JDBC
right now. We will eventually implement SQL92-compliant schemas in the
backend, and once that happens it'll be possible to do
On Sat, 01 Sep 2001 17:43:39 +0200, you wrote:
I've tried the jxdbcon driver now and it gives another view
of the actual database... I am not a PostgreSQL guy so I am
quite confused here. Anyway, this one seems to give the most
appropriate view of the database since the system tables
are listed
On Sun, 09 Sep 2001 14:25:38 +0530, you wrote:
Then, I tried to install the jar file for jdbc 'jdbc7.0-1.2. jar'
and extracted it to the directory /usr/lib/pgsql.
Never extract the contents of these jar files!
http://jdbc.postgresql.org/docs/#install
Put it in your CLASSPATH instead.
7.0 is
I'm not sure if you get this message via the list, but if you
post an a mailing list it would be nice if your address worked.
- Transcript of session follows -
... while talking to mail.ceedees.com.:
RCPT To:[EMAIL PROTECTED]
550 [EMAIL PROTECTED]... Relaying denied
550 [EMAIL
On Sun, 09 Sep 2001 14:48:41 +0200, you wrote:
It is of course a performance improvement if it uses only 1 SQL statement
rather than N+1 with N being the number of columns reported. E.g. if you
list all columns of all tables in a big database, this would be a huge win.
I think that can only
Attached is a patch that fixes DatabaseMetaDataTest in the JDBC
driver's test suite. With previous patches applied, this reduces
the number of failures of the test suite from 6 to 4. The patch
fixes the test case itself, rather than the driver.
Details:
1) The driver correctly provided
,
--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
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
On Sun, 9 Sep 2001 15:25:17 +0200 (CEST), you wrote:
That is correct.
Thanks.
Would it be useful to add this information to the documentation,
e.g. the documentation of ORDER BY in SELECT?
Most likely.
I'll post it on the docs list.
Regards,
René Pijlman [EMAIL PROTECTED]
I'm working on a problem in the JDBC driver that's related to
timezones.
How does PostgreSQL handle timezones in the FE/BE protocol
exactly?
When a client sends a time or timestamp value to the server via
the FE/BE protocol, should that be:
1) a value in the client's timezone?
2) a value in the
On Sun, 09 Sep 2001 13:38:52 -0700, you wrote:
[...]
Thanks for your explanation. This helps a lot.
If you could post a bit more about the issue you are having
I might be able to be more specific.
I'm looking at the 4 remaining failures of our own JDBC test
suite. They all have to do with
Attached is a patch that fixes
ConnectionTest.testTransactionIsolation() in the JDBC driver's
test suite. This reduces the number of failures of the test
suite from 7 to 6. The patch fixes the test case itself, rather
than the driver.
In addition to the change described in my posting below, I
On Thu, 6 Sep 2001 22:30:58 +0100, you wrote:
The problems are:
1. No Index information from the getIndexInfo method
Hmmm... looking at the source, it apppears that
DatabaseMetaData.getIndexInfo() is implemented. If it doesn't
work for you, we would need more information about the problem
to be
The ConnectionTest test case in our own jdbc2 test suite fails
to set and get the transaction isolation level correctly. After
looking at the implementation I've come to the conclusion that
the test case itself is flawed, but I wanted to check my
conclusion with this list.
What the test case
On Fri, 07 Sep 2001 10:12:39 +0200, I wrote:
getColumns() was fixed recently. It returned only columns with a
comment (IIRC).
No, it returned only columns with a default value, according to
Jeroen van Vianen who fixed it (in 7.2).
See http://fts.postgresql.org/db/mw/msg.html?mid=1032468
On Mon, 3 Sep 2001 22:01:17 -0500, you wrote:
public boolean isWritable(int column) throws SQLException
{
if (isReadOnly(column))
return true;
else
return false;
}
The author probably intended:
public boolean isWritable(int column) throws
On 04 Sep 2001 13:22:33 -0400, Dave Cramer wrote:
Isn't the JDBC 2 driver also an implementation of JDBC 1?
Yes, it is, but many of the libraries, and methods which are used in
version 2 of the driver aren't available in jdk1 so it won't compile or
run.
Ah, I see. And I assume we support JDBC 1
On Sun, 02 Sep 2001 23:41:49 +0200, you wrote:
On a busy server, serving web pages using tomcat and apache, I
get this error sometimes:
java.net.SocketException: errno: 48, error: Address already in
use for fd: 168
at java.net.PlainSocketImpl.socketConnect(Native
Method)
This means the
On Fri, 07 Sep 2001 02:37:36 +0200, I wrote:
Is your application opening and closing PostgreSQL
connections at such a high rate?
Or, I should add, is it opening that many connections?
Regards,
René Pijlman [EMAIL PROTECTED]
---(end of
On Thu, 6 Sep 2001 14:26:49 -0400 (EDT), you wrote:
Well, if it is that easy, I can do it. Patch attached and applied.
On Mon, 3 Sep 2001 22:01:17 -0500, you wrote:
public boolean isWritable(int column) throws SQLException
{
return !isReadOnly(column);
}
Actually, I
Perhaps this is a silly question, but why do we have separate
JDBC 1 and 2 drivers?
Isn't the JDBC 2 driver also an implementation of JDBC 1?
Regards,
René Pijlman [EMAIL PROTECTED]
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
[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();
On 02 Sep 2001 03:35:29 +0200, you wrote:
You don't need multibyte for iso-8859-1.
That's what I thought. But with current CVS (7.2) creating a
database with -E LATIN1 fails without multibyte support. See the
link in one of my previous postings in this thread.
Regards,
René Pijlman [EMAIL
On Mon, 03 Sep 2001 07:47:29 +0200, you wrote:
I ran a few bench marks on JAVA writing to a postgreSQL table using and
found that for the same number of records added to the table as a
similar PERL routine the following results :
PERL 39 seconds : JAVA 45 Seconds.
In a similar experiment
On Mon, 03 Sep 2001 09:49:27 -0700, you wrote:
Yes this is exactly what the driver does. It 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
On Thu, 30 Aug 2001 11:06:13 -0300, you wrote:
Thank you all for your help:
Dia Thursday, 30 de August, 2001 10:42, Rene Pijlman wrote:
like áéíóú (aeiou with accent)... they are replaced
by question marks (?)... any ideas?
What's the character encoding of the database?
It doesn't matter
I'm forwarding this workaround to the list. Can someone shed
some light on this?
Java uses Unicode and should be able to represent all ISO
Latin-1 (8859-1) encoded characters. Why would we need to tell
the driver what character set the backend is sending us? Can't
it ask the backend dynamically?
On Thu, 30 Aug 2001 11:46:16 +0900, Thomas O'Dowd wrote:
I found some time this morning to write and test a new EscapeSQL()
method. I didn't make a patch for the driver yet as I'd like to
hear some comments.
To what extent is this implementation JDBC compliant?
The spec is in section 40.1.5
On Mon, 27 Aug 2001 22:57:13 -0700, Barry Lind wrote:
I do not know what the server does if you have autocommit enabled
and you issue multiple statements in one try.
As you know, Peter Eisentraut said on hackers that all
statements in a semicolon-separated query string are processed
as one
On Thu, 30 Aug 2001 18:24:30 -0400, you wrote:
So now, to store my data in the database, I use BLOB instead of TEXT.
It works fine, my data is stored and retreived without any problem with
method set and getAsciiStream()... until there is a byte with value -1
in my Stream. If the 43rd byte is
Ricardo Pardini wrote:
they're all broken considering Portuguese characters
like áéíóú (aeiou with accent)... they are replaced
by question marks (?)... any ideas?
What's the character encoding of the database? See
http://postgresql.demunnikservices.nl/users-lounge/docs/7.1/admi
On Mon, 27 Aug 2001 15:25:23 -0700, Ralf Reissig wrote:
I there any support in postgres for reading uncommited data
without a read lock ?
No, there isn't. A dirty read is not possible with PostgreSQL.
This is not JDBC specific. See
I've read this twice and I have great difficulty understanding
what the real problem is. Your posting touches on so many
subjects: character encoding, statement length, driver versions,
large objects, calling functions, large parameter values,
stability...
Could you please summarize what the
On Mon, 27 Aug 2001 08:48:52 +1000 (EST), you wrote:
It's been mentioned before, but a set of error numbers for database errors
would make trapping exceptions and dealing with them gracefully a LOT
simpler. I have java code that runs against Oracle, Informix, PostgreSQL,
MS SQL Server and
On Mon, 27 Aug 2001 11:07:55 -0700, you wrote:
[executeBatch() implemented as one round trip]
Here is how I would suggest this be done in a way that is spec
compliant (Note: that I haven't looked at the patch you submited yet, so
forgive me if you have already done it this way, but based on
FYI ... I posted this question on the Sun JDBC-interest list.
This affects the PostgreSQL driver as well. Any thoughts?
Should Statement.executeBatch() reset the list of commands to empty?
The JDBC 2.0 API specification (1) doesn't mention this, but the Java tutorial does
(2).
1)
Attached is a patch for current CVS, consisting of a cvs diff -c
for the changed files and a few new files:
- test/jdbc2/BatchExecuteTest.java
- util/MessageTranslator.java
- jdbc2/PBatchUpdateException.java
As an aside, is this the best way to submit a patch consisting
of both changed and new
On Sun, 26 Aug 2001 21:30:45 +0200 (CEST), Anders Bengtsson
wrote:
Since it's non-obvious how to initialize it and how to use it, very few
have. :-)
This is probably true, but once you have your environment setup
(including a test database, password etc.) its just a matter of
typing make check.
On Thu, 23 Aug 2001 10:46:18 -0400 (EDT), Bruce Momjian wrote:
Uh, CHANGELOG? :-)
No, I haven't been doing that, figuring I would update it in the main
release notes. However, I haven't started doing that yet, and in fact I
don't think I know enough about jdbc to know how to describe the
On Thu, 23 Aug 2001 14:37:27 -0400, you wrote:
a patch [...] that fixes the ability to serialize a simple java class
into a postgres table.
The current cvs seems completely broken in this support, so the patch
puts it into working condition, granted that there are many limitations
with
On Mon, 20 Aug 2001 16:08:31 -0600, you wrote:
Is there a way to SELECT tables or create JOINs from multiple databases
through psql? [...] would this have to be handled programmatically with
multiple database connections?
Yes, you need multiple connections for that.
By the way, if you really
On Fri, 17 Aug 2001 15:11:57 -0400, you wrote:
Try a newer JDBC driver (from CVS).
Standard support answer #1 :-)
The driver is AFAIK 100% pure Java. I don't think there is a fix
for a JVM segmentation fault in the driver, do you?
the problem could be your JVM
That's better advice :-)
On Thu, 16 Aug 2001 12:47:10 -0400, you wrote:
I am seeing MANY of the following exception:
You'd better tell us something about the code and the query
that's throwing these exceptions.
Regards,
René Pijlman
---(end of broadcast)---
TIP 5: Have
On Wed, 15 Aug 2001 16:43:31 -0500, Ben Carterette wrote:
I have a query like SELECT * FROM table1, table2 and I want to read values
out of a ResultSet. What if the two tables have column names in common and
I can't predict the column numbers? Is there any way to get table1.id and
table2.id?
Attached is the patch requested by Tom Lane (see below). It
includes two changes in the JDBC driver:
1) When connected to a backend = 7.2: use obj_description() and
col_description() instead of direct access to pg_description.
2) In DatabaseMetaData.getTables()/getColumns()/getProcedures():
On Mon, 13 Aug 2001 12:07:59 -0400, you wrote:
Ok, I see what you're looking at. However, the book states the escapes
should only be supported when the underlying DBMS supports them and that
escape syntaxes must be included for stored procedures etc where
appropriate. Does PostgreSQL support
On Mon, 13 Aug 2001 16:16:27 -0400, you wrote:
Thanks for your feedback (and patience). Enclosed is my third
attempt at a patch to 7.1.2 to support Array.
Thank you. I'll be glad to give it some testing later this week.
[I think I've solved the mangled patch problem. Hotmail seems to
try to
On 07 Aug 2001 13:39:09 +0200, you wrote:
I am trying to update a field which contains an array of
type INT4 via JDBC.
Java source code? UPDATE statement? Table description?
Regards,
René Pijlman
---(end of broadcast)---
TIP 5: Have you checked
On Sun, 5 Aug 2001 23:08:16 +0900, you wrote:
I am trying to retrieve field of type bigint[] from postgres DB.
I tried most of getXXX methods of ResultSet abut I could not
do it.
The JDBC spec recommends ResultSet.getLong() for the JDBC type
BIGINT:
long getLong(int columnIndex) throws
On Wed, 1 Aug 2001 19:40:06 -0700, you wrote:
I get 100+ errors building. Many of the messages are complaining
that they cannot find javax.transaction.xa.Xid.
This is part of the Java Transaction API in J2EE:
http://java.sun.com/j2ee/transactions.html. Download and install
J2EE 1.2.1 from
On Wed, 1 Aug 2001 22:49:40 +0100, Ricardo Maia wrote:
The problem is that, as the PostgreSQL JDBC driver doesn't
follow JDBC Standard I had to write some specific code for
use it with PostgreSQL DB.
So what exactly are the deviations from the standard that you
encountered?
Regards,
René
67 matches
Mail list logo