0
votes
1answer
15 views

how to call postgres function with hibernate criteria

I am getting sorted results using hibernate criteria which generates the below sql: select * from mytable order by name asc; This is how i do it with hiberante criteria: ...
-3
votes
0answers
35 views

Auto Commit Error with Postgres using Java

I have a application that work with some transactions. So I plan to use auto commit false before doing calculations and insert statements and after calling inserting I commit. But there is error ...
0
votes
1answer
44 views

How to normalize your database in hibernate? (Repeating values don't get saved again and again)

imagine I have a table called Photo and a table called Tag. A Photo can have any amount of tags. Like a picture of the Brandenburg Gate in Berlin has as tags "Berlin", "Gate", ... Now there is a ...
0
votes
2answers
43 views

Exception in selecting values from database

I have written a query to fetch values from database and is to be shown in datagrid in jsf page. But i am raised with exception in daoimpl layer. While converting stringbuffer to string and getting it ...
1
vote
2answers
73 views

Null pointer exception while using hibernate

I am using Hibernate and spring. this is my model class @Entity @NamedNativeQueries({@NamedNativeQuery( name = "CSI_TARGET", query = "select * from CSITARGET('CSIINDEX',2)", ...
0
votes
1answer
50 views

No value specified for parameter 1

I am using Hiberante to connect to postgres database. I am trying to insert a record into the database. I have the values for the record in a string array which I got from a csv file. This is my dao ...
3
votes
1answer
51 views

How to pass BigInteger from java to Postgres?

I need to pass a BigInteger argument to SQL query. (on Postgres 9.2) I have this code in my DAO: public List<PersonInfo> select(String id) { BigInteger bigIntId = new ...
0
votes
1answer
23 views

data comes in a string, inserting into postgresql with java, what's most efficient way to break up the data?

I am writing a program in Java that uses the JDBC driver with Postgresql. I am using an API which when called, returns data in a string like so: id=-870229851 date = finished-20130501 ...
0
votes
0answers
29 views

Handling newline character in Greenplum external table

I am creating Greenplum external table and populating it with data from my map reduce output files present in hdfs. I am able to connect external table to the HDFS and access all the files present in ...
2
votes
3answers
58 views

Postgresql, pgAdmin, Java: How to make them all UTC?

How can I make sure my entire development environment around PostgreSQL is not messing about with local timezones. For simplicity I need to be 100% sure that each and every time(stamp) value is UTC. ...
0
votes
1answer
19 views

Group by with Named Parameter with Spring's NamedParamterJdbcTemplate

I'm using PostgreSQL and Spring 3.1 NamedParameterJdbcTemplate. If I have some SQL which uses a named parameter in the Select & Group By clauses, Postgres will return this as bad grammar. Running ...
0
votes
1answer
19 views

Security on single application/database server with PostgreSQL and Tomcat

(This isn't a question about whether it's better to use separate servers or a single server for application and database) My situation is that I've chosen to use a single server configuration with ...
1
vote
3answers
40 views

How to track position of columns on a DB table

Okay, this is a little bit odd to explain, I'll try my best. I have a DB table (SQL) called versions which contains a list of different operations that are part of a version. For example, version ...
0
votes
1answer
113 views

Escaping special character in Hibernate select query with fts

I am having the query like these Query query = session.createQuery("select object from EntityObject object where lower(object.columnName) like lower (E'%\\(test\\)%')"); and Query query = ...
0
votes
2answers
65 views

PostgreSQL equivalent of Oracle “bulk collect”

In PostgreSQL exists some ways to make a statement using bulk collect into like in Oracle? Example in Oracle: create or replace procedure prc_tst_bulk_test is type typ_person is table of ...

1 2 3 4 5 55
15 30 50 per page