query « postgresql « Java Database Q&A





1. How to "name" a query in postgres    stackoverflow.com

In postgresql a query in the querylog gets something like this:

2009-02-05 00:12:27 CET LOG:  duration: 3781.634 ms  execute <unnamed>: SELECT QUERY ....
Is there a possibility to put something more ...

2. JDBC postgres query with a timeout    stackoverflow.com

Unfortunately setTimeout is not implemented for JDBC/postgres. Is there some way I can simulate or workaround this? Functionally I want to execute the query and the then break if ...

3. How to cancel a postgres query in java/JDBC    stackoverflow.com

How do I cancel a long running postgres query via JDBC or Java? The usecase would be that an user starts a query on a postgres database via a front end, but ...

4. Additional, unspecified fields being added to a query    stackoverflow.com

I have some queries being run in a java program that makes use of a PostgreSQL database and some parts of an old version of JDataStore (the parts used to interact ...

5. PostgreSQL query for current minute    stackoverflow.com

My web application needs to get the results of all the items which have their time value for this minute. My table has a time attributes

id, message, time, ...,
where time is ...

6. Postgres Exception : No results were returned by the query    stackoverflow.com

I am trying to insert some rows in to a table... I am using postgressql-7.2.jar. I get the following exception org.postgresql.util.PSQLException: No results were returned by the query. at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:255) I ...

7. How can I protect a dynamic SQL query against SQL injection in Java?    stackoverflow.com

I know that the only really correct way to protect SQL queries against SQL injection in Java is using PreparedStatements. However, such a statement requires that the basic structure (selected attributes, joined ...

8. Is this the right way to code a query to create a new table in postgres in java?    stackoverflow.com

String query = "CREATE TABLE \ "EtherMap\".\ table_name\"( feature_name (20));" Here feature_name is the variable that contains the column name table_name is the variable that contains the name of the table Ethermap is the ...

9. How I make result of SQL querys with LIMIT different in each query?    stackoverflow.com

I have the following SQL:

SELECT id, url 
FROM link 
WHERE visited = false  
ORDER BY id 
LIMIT 500; 
--*500 is only a example I'm making a webcrawler and there is a ...





10. Why are my queries deadlocking?    stackoverflow.com

I'm trying to insert some files into a Postgres database. Since lots of duplication is expected, we put the files themselves into the file table, then link them to the section ...

11. Can I get types from an arbitrary query in Postrges?    stackoverflow.com

I've got a situation building a data analysis tool where my users can write SQL query (including joins, calculations, etc) and I need to be provide options to the user based ...

12. Writing the output of sql query to a file    stackoverflow.com

I have an SQL query:

SELECT 'DROP TABLE ' || tablename
  FROM pg_catalog.pg_tables where tablename like 'r_395%';
whose output is this:
?column?      
--------------------
 DROP TABLE r_395_0
 DROP TABLE ...