Tagged Questions
PostgreSQL is an open-source, object-relational database management system (ORDBMS) available for many platforms including Linux, UNIX, MS Windows and Mac OS X. Please mention your PostgreSQL version when asking questions.
2
votes
0answers
30 views
Spring Data @CreatedDate annotation doesn't work for me
I am working on project where I use Spring Data. I wanted to fill in creationTime field using @CreatedDate annotation instead using method with @PreUpdate or @PrePersist annotation (doing it this way ...
2
votes
0answers
135 views
How do I trickle results to the client from PostgreSQL
For testing I would like to create a query that trickles results back to the client.
Have it return 1 row, wait a second, return 1 row.
I tried the trivial change but it failed. (it returns a ...
2
votes
0answers
20 views
Ordering postgres indexes with GORM
I would like to know how to set the default order for an index. Grails 2.3.3, postgres 9.
Goal is this index:
"crstate_idx" btree (cr_state, last_updated DESC)
This GORM code:
static mapping = ...
2
votes
0answers
34 views
psql - write a query and the query's output to a file
In postgresql 9.3.1, when interactively developing a query using the psql command, the end result is sometimes to write the query results to a file:
boron.production=> \o /tmp/output
...
2
votes
0answers
58 views
+150
PostgreSQL function string_agg in JPA
In PostgreSQL, string_agg(column, separator) allows to aggregate some Strings. I try to use it with JPA but it is not a JPA standard function.
Note : This is not the equivalent of ...
2
votes
0answers
16 views
pg_dump to dump table schema with constraint as compact
My pg_dump returning the constraints are in alter query at the end of the dump file. I want those to be inside the create table(...) section.
For example. I have created a table as below with a ...
2
votes
0answers
48 views
Save sql file without NULL values
When I run
pg_dump -O --column-inserts -U root map --file=
anything that has the value NULL is also printed.
Can I create an SQL file such that the columns which have NULL are not included?
...
2
votes
0answers
39 views
How to pass a set of composite types (UDTs) in PostgreSQL using JDBC
We are migrating from Oracle to PostgreSQL Enterprise DB and we have a stored procedure that accepts table-like structure. We used STRUCT with Oracle and it worked very well. Now this table is ...
1
vote
0answers
5 views
Not retrieving NOTIFY with libpq in a C++ program
I'm enhancing a ROS (robot operating system) stack sql_database to be ably to handle postgresqls LISTEN and NOTIFY commands. As mentioned, I'm using libpq version 9.1.10-0 on Ubuntu12.04 within a C++ ...
1
vote
0answers
24 views
PostgreSQL + Lazarus Pascal - failed connection during use
I've built a program using Pascal + PG on a single PC running Ubuntu 12.04.
It's been working fine for about a month now, until this morning. So I'm not sure if it's an auto-update of the OS that did ...
1
vote
0answers
40 views
Django query slow on profiler but fast on PostgreSQL
Django-live-profiler is showing me a query executed a huge number of time with a slow average time. So the total execution time of the request is high.
When I execute the same request directly on ...
1
vote
0answers
50 views
How to read/write a boolean array in a Postgres database?
I have a postgres DB containing a table with a boolean array for the days of the week (t/f whether the employee has to work on this day or not).
The table is as follows:
CREATE TABLE employee(
...
1
vote
0answers
20 views
Windows refuses postgres connection
I have a local network connecting 15 PCs. Every PC has postgres installed (8.3, 8.4, 9.2). Every database has the exact same installation parameters as name, user, password, etc.
I'm using a Java ...
1
vote
0answers
25 views
SQLAlchemy: Join to subquery with no from field
I have a table called product_model with its corresponding ProductModel SQLAlchemy model.
I wish to join the product_model table to a select sub query which simply unnests two PostgreSQL arrays ...
1
vote
0answers
22 views
Does Hibernate Support Postgres 9.2 Json Data Type?
*strong text*Does Hibernate Support Postgres 9.2 Json Data Type ?
Looks like Hibernate does not support Postgres Json datatype.
I am getting the following error :
...