Re: [GENERAL] Selecting large objects stored as bytea

2008-02-22 Thread Tomasz Ostrowski
On Fri, 22 Feb 2008, Daniel Verite wrote: > You could use the function below that breaks a bytea value into > pieces of 'chunksize' length and returns them as a set of rows. When you do this then make sure that this column has external storage: alter column [column_name] set storage exter

Re: [GENERAL] Selecting large objects stored as bytea

2008-02-22 Thread Daniel Verite
Ludger Zachewitz wrote: 'ResultSet rs = statement.executeQuery(selectClause);' After increase of HEAP in java it works, but also the java needs much memory, as I don't expect it. I have also tried to substitute this command line by prepared-statement like 'PreparedStatement ps = this.

Re: [GENERAL] Selecting large objects stored as bytea

2008-02-22 Thread Richard Huxton
Ludger Zachewitz wrote: Hello, I have the following problem accessing postgres (version: 8.2.X) from java 1.6_03 using driver (currently version: postgresql-8.2-508.jdbc4.jar) and hope someone can help me. I have created an table 'files' with the columns 'file_id', 'filename' and 'file_content'.