sql « postgresql « Java Database Q&A

1. Saving java object to PostgreSQL    stackoverflow.com

I want to save my java object to postgresql column and i'm looking for a simple way to do so.

  1. what type for columns stores objects ?
  2. I heard about serialization but ...

2. Saving java object to PostgreSQL problem    stackoverflow.com

I'm trying to save an object in a postgre column(bytea) with the following code:

Utilisateur utilisateur = new Utilisateur("aa","aa","aa",10,"aaammm",12,Role.ADMINISTRATEUR);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

3. Invoke postgres commands via Java Runtime.getruntime.exec()    stackoverflow.com

Initially I ran this code without the leading "cmd" and I received an access denied message. Postgres is being run as a service by an account that cannot be logged ...

4. How to map standard Java types to SQL types?    stackoverflow.com

I want to write a program, which creates RDBMS-tables through JDBC automatically. To add columns to a table, I need to know the name of the column and the column's RDBMS ...

5. Map database type to concrete Java class    stackoverflow.com


Map a column data type to its corresponding Java class.


A query returns meta information from a database:
  dictionary.resource_bundle rb
For example, this query returns (the ...

6. SQL not running in java when it should    stackoverflow.com

I have tested my sql in pgAdmin, it returns results fine. However when in Java it does not return any values when the dates are 25/03/2011 and 30/03/2011 but it does ...

7. How to create postgresql database using Ant?    stackoverflow.com

Is there any method to create postgresql database unsing ant? I put an SQL creation statement inside a sql Task:

there is no exception but the database is not created. Does ...

8. What is the fastest way to retrieve sequential data from database?    stackoverflow.com

I have a lot of rows in a database and it must be processed, but I can't retrieve all the data to the memory due to memory limitations. At the moment, I ...

9. quick and dirty SQL string escaping    stackoverflow.com

I'm putting the finishing touches on a home rolled QueryBuilder class for a web application with a postgresql DB. It uses PreparedStatement for all queries and is protected against SQL injection. ...

10. How create a SQL array from a Java List?    stackoverflow.com

I'm trying to insert an array in a table, but I need to convert the list to the SQL Array type. I'm using the Connection#createArrayOf() method, but I'm getting an exception. I ...