for PostgreSQL questions specific to version 9.1.
3
votes
0answers
113 views
Concurrent db table indexing through alembic script
Is it possible to create concurrent indexes for DB table through alembic script?
I'm using postgres DB, and able to create concurrent table indexes through sql command on postgres prompt.(create ...
3
votes
0answers
504 views
Connecting to a multiple databases using hibernate catalog
I am working on an application where it requires to connect to two Postgres databases using hibernate. The details have been given below :-
Software Details :- Java 1.6, Hibernate 4.1.0, Postgres ...
2
votes
0answers
66 views
How to properly emulate statement level triggers with access to data in postgres
I am using PostgreSQL as my database for a project at work. We use triggers in quite a few places to either maintain computed columns, or tables that essentially act as a materialized view.
All this ...
2
votes
0answers
42 views
PosgreSQL sorted Nested Datas
I am new on PostgreSQL and i want to sort data on a table which, for some of them are nested.
Table is a BOM structure. A product BOM can be composed by a component and other BOM. What i need, is to ...
2
votes
0answers
43 views
Parallel drop/create on postgres using DBA fails with: ERROR: tuple concurrently updated
We have N number of separate processes that can kick at the same time which all talk to the same postgres database. These "processes" are jdbc code which drop a user/schema and then recreate ...
2
votes
0answers
276 views
Can't init cluster for PostgreSQL
Now I'am trying to install Postgresql.
I have already:
Install postgresql.
Create user for database.
Create directory for cluster.
And now I can't init cluster here is log of the error.
...
2
votes
0answers
198 views
Doctrine 2.2/ORM trouble : Entity/table replicated for each PostgreSQL schema
When using Doctrine 2.2 & PostgreSQL (under Symfony 2.1, but it has nothing to do with it) one declare an entity as follows:
<doctrine-mapping ...>
<entity name="User" ...
1
vote
0answers
36 views
Rails Postgres HSTORE: PG::InternalError: ERROR: Syntax error near '=' at position 1
I'm trying to execute a where() with false, but instead is executing it as if I passed a query:
PG::InternalError: ERROR: Syntax error near '=' at position 1
LINE 1: ..."subject_users"."subject_id" ...
1
vote
0answers
25 views
postgrest post request -Getting Error for string passing in raw sql
I am getting error for raw sql if i am using any string literals inside the sql query.
http://localhost:3000/db/test
{
"sql": "select * from party where party_name='xxx' "
}
error:
...
1
vote
0answers
56 views
Configuration Glassfish 3.1.2 Connection Pool to PostgreSQL Using SSL
I can easily set up a connection pool from glassfish to postgres in an unsecured manner. However I am trying to get a connection pool connection using SSL. I have SSL set up using a CA cert on the ...
1
vote
0answers
52 views
Why does 'WHERE col = int' make this PostgreSQL query slow?
I'm doing a full-text PostgreSQL search, and I've noticed that simply changing the operator on one of my filter conditions from '<>' to '=' substantially increases the query time, from 24.7 ms to ...
1
vote
0answers
115 views
Postgresql Crosstab with Array row_name
I have the following SQL statement. The inner query ('SELECT ARRAY...ORDER BY 1,2') works correctly and gives the correct totals for each row_name. When I run the crosstab, the result is incorrect. ...
1
vote
0answers
253 views
Bash: Calling bash script from postgresql trigger function
I am calling a bash script from the trigger function in postgresql. The script is called after update of the value(log_interval) in the table in SQL.
The read the changed value(log_interval) from ...
1
vote
0answers
98 views
Referencing environment variables in elastic beanstalk parameters
I know how to set environment parameters inside Elastic Beanstalk by console or option settings, but I can't give with how to set an option value from other environment variable. For example:
...
1
vote
0answers
135 views
Dynamic calculation in postgres
I am trying to do a dynamic calculation in postgres
as following
drop table if exists calculation_t;
create table calculation_t(
Id serial,
calculation_logic varchar(50))
Inserted a calculation ...
1
vote
0answers
97 views
psql: could not connect to server: No such file or directory when trying to run psql command
I'm getting this error when ever I try to run the psql command as the user postgres.
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
...
1
vote
0answers
76 views
Django and postgresql running custom query timezone madness
I have a real issue with dates and running a custom sql in django with connection.cursor().
Currently every date I display to the end user I convert with .astimezone(timezone) but I have this custom ...
1
vote
0answers
52 views
Complex sql query involving timestamp to timestamp periods and joins and sums - is it even possible?
I am trying to create database query, which will select rows from one table, create periods from those rows (using Lag window function), and join the query with rows from different table, where it ...
1
vote
0answers
201 views
Unable to update table in PostgreSQL with Django due to deadlock
I have a cron job that runs a Django management command every minute. When the command starts, it sets a flag is_running = true in a table stored in a PostgreSQL database (using pgbouncer as a ...
1
vote
0answers
92 views
Postgres window function output restriction
I am using postgres 9.1.11 and have created a function to cumulate a variable (ln_ret) over a partition, eventually returning my desired column (cumret_pf). The parameters start_date and end_date ...
1
vote
0answers
42 views
postgresSQL: copy to xml without \n
I want to write results from queries into xml files.
As I read in the documentation postgres supports only text, csv and binaries. So I use the standard text for my file.
The problem is that postgres ...
1
vote
0answers
370 views
Migrate to AWS from Linode
Migration to another server is not easy that way when having a large database,
we want to move our database in linode to amazon RDS database, i tried to pg_dumb and pg_restore
and it success but it ...
1
vote
0answers
19 views
How can i show data with semicolon delimited in a column into multiple rows?
I have a table like below.
Id NAME
--- ------
1 A;B;C
2 D;E
I want get the data as below
Id Name
--- -----
1 A
1 B
1 C
2 D
2 E
Can any ...
1
vote
0answers
9k views
No managed connections available within configured blocking timeout (JBoss 7 and Postgres)
Periodically i get error :
ERROR JDBCExceptionReporter --> javax.resource.ResourceException: IJ000453:
Unable to get managed connection for java:jboss/datasources/myDB
08:12:05,928 ERROR ...
1
vote
0answers
93 views
Got the error : org.apache.tomcat.dbcp.DataSourceConnectionFactory
javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.DataSourceConnectionFactory]
i am using ...
1
vote
0answers
90 views
Querying distance on 2 dimensions in a 3 dimension spatial data set
I have a case requirement where I need to find the nearest N suppliers who supply specific product types. The types in an int range of 0..1048575, which represents an hierarchy. Any supplier could ...
1
vote
0answers
708 views
32 bit Qt program can't find Qt Postgres plugin dll on 64 bit Windows 7
I have a 32 bit program built with mingw which uses Qt's QSqlDatabase class to access a Postgres database. We install the program to c:\company\product\bin. We place the Qt PSQL driver plugin, ...
1
vote
0answers
405 views
partition PostgreSQL table based on geometry column
Here is the table with geometry field :
Table "public.regions"
Column | Type |
-----------+-----------------------+-
id | integer |
parent_id | ...
1
vote
0answers
57 views
looking for a strategy to avoid cyclic dependency in PostgreSQL schemas
In my db, I have schema a with entities that depend upon schema b, and schema b has entities that depend on schema a. This came about over a year of incremental development. Now, migrating the db to ...
1
vote
0answers
324 views
Search special characters using to_tsquery
How to construct to_tsquery to search for special characters like , "_", etc... ?
I have entry in my tsvector column like "v_130" and I would like to search for "v_130" but when I construct ...
1
vote
0answers
225 views
how to map postgres text type to @LOB in ejb3
How to map text type in postgres as @LOB and fetchtype.lazy in ejb3?
0
votes
0answers
6 views
Can Numeric Type store signed value in Postgres?
In PostgreSQL,I would like to store signed value -999.9~9999.9.
For this, can I use numeric(5.1)?
Or, what type should I use?
Please give your any advice.
Thank in advance.
0
votes
0answers
22 views
Postgres C api functions with optional arguments
I would like to create a function
CREATE FUNCTION func(a INT, b DOUBLE PRECISION = 1e-9, c DOUBLE PRECISION = 1e-9)
RETURNS BOOLEAN
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
...
0
votes
0answers
18 views
Importing a very very large file in postgres without defining the table structure
I have an insanely large csv file which I want to import in postgres db. It is of the size of 500MB. I do not want to create the tabe first with more than 1000+ columns and then go for the insert like ...
0
votes
0answers
30 views
Playframework 2.3.x PostgreSQL PostGis
I'm trying to use a PostgreSQL with Postgis DB in a play! 2.3 application.
I've imported the postgis library and I'm using the postgres jdbc to access the DB.
Unfortunately, it seems that the Ebean ...
0
votes
0answers
25 views
Postgres Backup
I was tasked to create weekly and daily snapshot backups of the data.
Since I just started working with Postgres, I found the option to use pg_dump for the backup.
Unfortunately the server being ...
0
votes
0answers
5 views
How can I restore a db in postgres when only a few tables were not copied and the app throws errors of encoding?
I am triying to restore a db in postgres. The backup it´s OK but the restore gives me the next problems:
COPY failed for table "confirmaciones": ERROR: secuencia de bytes no válida para ...
0
votes
0answers
66 views
Postgres: org.postgresql.util.PSQLException: ERROR: insufficient data left in message
I read enough to know that this occurs when a string contains some characters that Postgres doesn't like. However, I cannot figure out if there is a way to validate strings before writing them. In ...
0
votes
0answers
33 views
is there any way to export mysql boolean data as 'true' or 'false'
I have a MySQL database and I want to import the data to PostgreSQL. The problem is when I export the source file as SQL dump then I need the boolean column as 'true' or 'false'. Is there any way to ...
0
votes
0answers
23 views
Importing file to a table
I have a table called Address
CREATE TABLE "Address"
(
"AddressID" integer NOT NULL,
"AddressLine1" character(80) NOT NULL,
"AddressLine2" character(80),
...
0
votes
0answers
43 views
psql load dump - invalid hexadecimal data: odd number of digits
I am trying to load 70GB of data (that I created from emails and attachments).
I am loading that dump file to a database now in another ubuntu server.
I already tried loading that dump in the ...
0
votes
0answers
9 views
DB engine for “cache” purposes
my relational databases are quite big, up to 250-300GB in size, tables containing 200m rows etc. I use postgresql as engine. I think I do not need relational database for all purposes, but changing it ...
0
votes
0answers
25 views
Postgres 9.1 uninstall error
When I try to remove Postgres using standard windows, I get this error:
OS: Windows 8.1 x64
What does it mean and what should i do?
0
votes
0answers
75 views
Unable to uninstall postgres completely from mac osx
I have completely unintsalled postgres and postgis from my system but still I am able to enter postgres through psql command . I need to uninstall completely because it is showing two psql and later I ...
0
votes
0answers
14 views
Getting wrong results from fultext search in postgres
This may table structure:
CREATE TABLE semantified_content_key_word
(
id bigint NOT NULL,
semantified_content_id bigint,
key_word_text text,
content_date timestamp without time zone NOT NULL,
...
0
votes
0answers
62 views
Converting Data Type Postgres — > Mssql
I would like to know what is the relevant data type for Postgress INTEGER[] on MSSQL ?
postgres Type INTEGER[],That is the mapping type in MSSQL. :)
0
votes
0answers
17 views
POSTGRESQL 9.1 COPY TABLE
Is it possible to define two types for null values when copy data into a postresql?
In my csv file, I have two types of null values: empty cells and 'NA'.
COPY TABLE_1
FROM 'file.csv'
DELIMITER ';' ...
0
votes
0answers
47 views
Symfony2 password encoding simulation with PostgresSQL
I need to simulate the Symfony2 password encoding process in a PostgreSQL stored procedure. I followed the procedure under Symfony\Component\Security\Core\Encoder\MessageDigestPasswordEncoder. However ...
0
votes
0answers
61 views
Permission denied for relation table outbox
i want to instal gammu-smsd but i got error
Thu 2014/11/20 06:04:17 gammu-smsd[31457]: Error: ERROR: permission denied for relation outbox
Thu 2014/11/20 06:04:17 ...
0
votes
0answers
33 views
Mule getconnection() deadlock
The system I am working with has 2 databases with one being a hot stand by.
The problem I am seeing is that when the hot standby goes down mule keeps on trying to connect to it (as designed) but ...