Data dodania Pytanie
2016-10-14 13:10 PostgreSQL: row_to_json with selective columns »
Task concept and my question Using Postgres 9.4. How could I use row_to_json(row) with selective columns (not the entire row)? I need to discard one ...
(1) odpowiedzi
2016-10-13 16:10 Distance between two 3D point in geodjango (postgis) »
my problem is the following: I created two points for the example: SRID=3857;POINT Z (62780.8532226825 5415035.177460473 100) SRID=3857;POINT Z (6278...
(0) odpowiedzi
2016-10-13 00:10 bdr_init_copy hangs indeffinately »
Fairly new to Postgresql, but have to get replication set up. I settled on BDR, and it works fine in the local demo, but on distributed machines it st...
(0) odpowiedzi
2016-10-10 18:10 Why the size of user tables is much less that the size of other objects in a PostgreSQL database »
I need help in understanding my database's size. I suppose the question is kind of simple for the database pros. I'm not a pro but I want to understan...
(1) odpowiedzi
2016-10-09 21:10 Procedure INSERT with CASE returning number of inserts »
I have 2 tables in my PostgreSQL database: 1) Plan ID (INT) m1 (NUMERIC) m2 (NUMERIC) m3 (NUMERIC) m4 (NUMERIC) m5 (NUMERIC) m6 (NUMERIC) m7 (NUME...
(0) odpowiedzi
2016-10-07 11:10 Geonetwork 3.0.3 initial map extent »
I installed Geonetwoek 3.0.3 from .war file in Tomcat 8.0 on windows server 2008 R2. The databse used is PostgreSQL 9.4. I want to show Slovenia after...
(0) odpowiedzi
2016-10-06 16:10 ERROR: syntax error at or near "CONTRAINT" »
I am trying to disable the fk temporary, for this I ran below command. ALTER TABLE ot_user DISABLE CONTRAINT fk_ot_user_pref_uid; After ran above q...
(1) odpowiedzi
2016-10-06 11:10 Create a DB in Postgres 9.4 with a PostGIS template without being a superuser »
I have created a PostGIS template: PSQL=/usr/pgsql-9.4/bin/psql -u postgres -d template_postgis $PSQL -d template_postgis -c "CREATE EXTENSION IF NOT...
(0) odpowiedzi
2016-10-06 10:10 REINDEX TABLE GIVES ERROR IN POSTGRES »
postgres=# REINDEX TABLE pg_catalog.pg_proc; ERROR: cross-database references are not implemented: "pg_catalog.pg_proc" ...
(0) odpowiedzi
2016-10-05 20:10 PostgreSQL DB after replication inaccessible - "role "postgres" does not exist" »
We have master-slave replication on PostgreSQL 9.4.9 CentOS 6.8 and till today we've had beautiful time with our replication between our two +- ide...
(0) odpowiedzi
2016-10-04 16:10 pg_dump does nothing in command prompt »
I opened an SQL Shell (psql) and entered my information: username, port, host, database and password. Then the name of the database popped up like so...
(0) odpowiedzi
2016-10-03 07:10 multiple column searching using postgris and django »
I am using Django 1.10 with postgres 9.5. I have created a custom 'User' model that has several columns such as gender, date_of_birth, height, weight,...
(0) odpowiedzi
2016-09-28 02:09 Postgres jsonb 'NOT contains' operator »
I'm experimenting with postgres jsonb column types, and so far so good. One common query I'm using is like this: select count(*) from jsonbtest WHE...
(0) odpowiedzi
2016-09-27 18:09 Query with regexp_matches in select returns empty result set »
I have following SQL: SELECT code, name ARRAY_TO_JSON(regexp_matches(code, '^(.*?)(24)(.*)$','i')) AS match_code, ARRAY_TO_JSON(regexp_matches(name, ...
(1) odpowiedzi
2016-09-27 11:09 SQLAlchemy - Bulk update using sqlalchemy core table.update() expects all columns in the values data »
I'm trying to do a bulk update using core SQLAlchemy to a postgres database. bulk_update_mappings does not work (reports StaleDataError). So I'm tryin...
(0) odpowiedzi
2016-09-26 13:09 How to read file with BYTEA in Postgres »
Just like an oracle DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY); BYTEA.LOADFROMFILE ( Templob, v_bfile, DBMS_LOB.GETLENGTH(v_bfile)...
(0) odpowiedzi
2016-09-24 17:09 Storing JSON Metadata in mySQL/Mongo OR Postgres »
I am working on project, where I would like to introduce metadata per category. That's mean I should be able to introduce different properties per cat...
(1) odpowiedzi
2016-09-23 10:09 how to add encoding in xml file using pgsql »
I have a Stored Procedure, which creates a xml file and I can't add encoding in the file. My current setup is: CREATE OR REPLACE FUNCTION db.stp_fil...
(0) odpowiedzi
2016-09-23 08:09 How to identify columns with non english values in postgresql 9.4 »
My table has both English and non English characters and i want to extract the rows with non English characters using postgresql 9.4 For example: My ...
(1) odpowiedzi
2016-09-22 10:09 Add multiple value to postgres enum type »
I need to do something like below: ALTER TYPE my_type ADD VALUES( 'two', 'three', 'four'); It can be done like ALTER TYPE my_type ADD VALUE 'two';...
(0) odpowiedzi
2016-09-22 07:09 Dynamic Select Into Query - Postgresql »
EXECUTE format( 'SELECT MAX(sum) FROM table 1 WHERE %s = %s') INTO max_value USING id_column, id_value; Getting error: ERROR: operator do...
(1) odpowiedzi
2016-09-21 09:09 No buffer space available »
I am using an application in Yii and postgres database. When i run the application on live server(not local system) i am getting this error "CDbCo...
(1) odpowiedzi
2016-09-21 07:09 Is it possible to know the memory being allocated by the method "CreateSharedMemoryAndSemaphores"? »
I am a newbie to databases and Postgres and I am analyzing the memory being allocated by Postgres in the method "CreateSharedMemoryAndSemaphores". L...
(1) odpowiedzi
2016-09-21 00:09 Postgres Function to insert multiple records in two tables »
create table public.orders ( orderID serial PRIMARY KEY, orderdate timestamp NOT NULL ); create table public.orderdetails ( orderdetailID...
(1) odpowiedzi
2016-09-19 12:09 Postgres Apply FILTER on subquery »
I have a postgres table like , select projectid,branchid, storeid,ret from "MyTable" ; 5400;741;8130;"a" 5400;741;8130;"b" 5400;741;8131;"c" 5400;...
(0) odpowiedzi
2016-09-17 16:09 JPA Eclipselink PostgreSQL Query field for Null values »
I stumbled over a very strange behaviour with JPA Eclipselink and PostgreSQL. create table test(id bigint, name varchar(255)) insert into test valu...
(1) odpowiedzi
2016-09-16 17:09 postgresql group by difference to previous row »
I have some sorted values (called point) that must be group together based on their difference to the previous row like in the following example. In ...
(1) odpowiedzi
2016-09-15 16:09 Return multiple rows/columns from a function and View them in postgres 9.4 »
The heart of the issue is that I needed an Update on Select in PostGres and it didn't appear to support that, so I found a workaround. I made the fol...
(0) odpowiedzi
2016-09-15 07:09 Which function in postgres filters the values based on the join condition? »
The qual node in the query plan gives information about the where clause condition. Which node contain information about the on condition of a join qu...
(0) odpowiedzi
2016-09-13 10:09 Need help converting a query from PostgreSQL to CakePHP »
I have a query that works well when i execute it in my PostgreSQL database but I can't make it work in my controller. This is the query: SELECT id,...
(2) odpowiedzi
2016-09-12 20:09 Postgres - return row data as JSON array or arrays »
On PG v9.4 and higher, I would like to export some data (based on SELECT statement) as JSON array of arrays. The standard json_agg returns what I wan...
(1) odpowiedzi
2016-09-09 21:09 Postgres - Permission denied for relation sequence »
I have this sequence: CREATE SEQUENCE colors_color_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 24 CACHE 1; ALTER TABLE...
(1) odpowiedzi
2016-09-08 15:09 Optimize query, PostgreSQL »
How can i optimize this query? I want to find all rows from firms2branches by project_id that exists in firms and accounts_premium. My tables: -- 500...
(0) odpowiedzi
2016-09-08 15:09 Hibernate: StoredProcedure with recursive depthsearch: Mapping/Output Problems »
I searching for help. I have to map my Postgres 9.4 Database (DB) with Hibernate 5.2, of course it's an study task. The biggest Problem is, that I'm n...
(1) odpowiedzi
2016-09-08 10:09 I need to restore db from dump and cannot do it »
I have a database dump at D:/backup.dump. I try to restore my database min_ro: I open psql.exe plugin. There are words min_ro=# Then I write restor...
(2) odpowiedzi