Quantcast
Channel: Question and Answer » postgresql
Browsing all 1138 articles
Browse latest View live

What is the best database system for my situation? [closed]

I’ve got a few coders, who program in C++/C# and PHP/Python but we right now need all the infrastructure (from you of course) and some advise on a Database System that could handle potentially...

View Article


GeoJSON and php i cant visualy roads from postgres database

I am make a json file with geometry MultiLineString from the posgresql but when i try to load the file in map.data.loadGeoJsonis not visually the roads but if i take the link from google api example is...

View Article


Is it possible to label a postgis Query Layer in ArcMap?

I’ve created a PostGIS query layer and I can’t label it. I’m trying to work out if I’m dealing with a bug that I can’t workaround, a bug that I can workaround, or if it is operator error. After getting...

View Article

Why does a select statement dirty cache bufferes in postgres

I am running EXPLAIN (ANALYZE, BUFFERS) SELECT ..... on a query in my Postgres 9.3 server. I end up seeing something like Buffers: shared hit=166416 dirtied=2 in the output. From the documentation,...

View Article

Export PostGIS line to AutoCAD with graphical direction information

Some time ago I managed to export from PostgreSQL to AutoCAD DXF format a line (LINESTRING) using ogr2ogr program with a PostgreSQL Query, and it works (I can visualise it by the QuantumGIS). Now I...

View Article


Image may be NSFW.
Clik here to view.

Similarity between two or more trajectories

I have the data of trucks (http://www.chorochronos.org/). This data are gps coordinates of multiple trajectories of trucks in Athens. I have to calculate the similarity between the trajetories, in...

View Article

Copying database to different hard disk

Total noob at database administration here, excuse my ignorance. I have a server running a Rails application that’s using PostgreSQL. The database is saved on drive /z/, which seems to have filled up....

View Article

“root” execution of the PostgreSQL server is not permitted

I run this code as root: /usr/local/bin/postgres -D /usr/local/pgsql/data because it wanted me to run it. However it gives this error; "root" execution of the PostgreSQL server is not permitted. The...

View Article


pg_get_viewdef error while running pg_dump in PostgreSQL

Occasionally, I get the following error while doing a simple pg_dump ( pg_dump -U postgres -Fc -f mybackup.dmp mydb): pg_dump: [archiver (db)] query failed: ERROR: could not open relation with OID...

View Article


Error creating a spatial database. ERROR

I have been trying to get Postgis set up for a while now, I am stuck on one error and have not found a solutions yet. This is on Ubuntu 14.04.1. I am trying to run: CREATE EXTENSION postgis But am...

View Article

modeling data dimensions as columns – some dimensions are highly variable...

Please excuse my question if it is a bad one – I am not a DBA… I would like to model the following data: Let’s say that I have one column that is the row id as generated by a sequence. Let’s also say...

View Article

Is a Postgres long-running query aborted if the connection is lost/broken?

If I open a connection to Postgres and issue a long-running query, and then break the connection (e.g., kill the client process that opened the connection), will the long-running query continue to run,...

View Article

Postgresql doesn't accept replication connection

Plain old streaming replication. PostgreSQL: 9.2.7 Windows 8.1 64 bit My primary and secondary clusters are on same windows machine. I have already done pg_start_backup() and everything, so both...

View Article


Postgres – Combine similar queries with extra where clause

I am trying to combine a number of fairly time consuming queries into one (if possible) The database contains race-track data that records the times for laps completed by drivers (or users here), the...

View Article

QGIS isn't displaying dates in the attribute table

I have a QGIS project that links to data in a Postgres database. For some reason, QGIS is not displaying any data in date fields. The date fields appear to be fine in Postgres and I have performed...

View Article


List distinct column values where those rows share other column values

I’m trying to write a query to detect possibly-invalid data in a PostgreSQL table. We have a table of city names like this: # `city_names` id | name | language | dialect | city_id...

View Article

PostgreSQL – summing arrays by index

I have an array of doubles column (double precision[]) in PostgreSQL that keeps half hour values for a day. So each array holds 48 values. I need an efficient query that is summing all this array...

View Article


Image may be NSFW.
Clik here to view.

If do not want to use pgRouting then what?

Good evening fellow GISers, I am interested in creating an online routing application. So supposing I have all the data I want into a postGIS database and loaded onto GeoServer and I am willing to use...

View Article

Postgres inherit indexes for partitioned tables

I have a table with approximately 60 million rows that I have partitioned by state into 53 sub-tables. These tables “inherit” the big table like so: CREATE TABLE b2b_ak (LIKE b2b including indexes,...

View Article

Ensuring that 1 row has 5 specific records referencing it

Context: a TEST has many CASEs. Typical. However, the catch is that a TEST instance must have exactly 5 instances of CASE (1 to 5). I could do something like this: create table TEST ( ID Integer not...

View Article
Browsing all 1138 articles
Browse latest View live