Operator “~
Let’s say I have a table with 1 000 000 records. Structure of table is: create table individual ( id serial primary key, surname varchar(128), "name" varchar(128), patronymic varchar(128), birth_dt...
View ArticleDisplaying Google Map using MapServer, C# and PostgreSQL?
I am displaying Google Map (MapServer) by using C#. And also highlighting the districts on the Google Map using PostgreSQL data. Every thing is working well but when I use any options like zoom in,...
View ArticlePostgres OSM planet reverse geocoding
i’m building function for reverse geocoding in Postgres using PostGIS function’s. For now i was able to clean up all the data that was useless to me(rivers, buildings,etc.). I got 3...
View ArticlePoint inside st_dwithin with wrong results
I want to get all points, that are in the same area. Therefore, I have the following query for my table check: SELECT l.location_id, l.location FROM check l INNER JOIN check l2 ON ST_DWithin...
View ArticleXRC error when trying to access PostgreSQL view properties
I have strange problem, when trying to access PostgreSQL view properties through PgAdmin III: Error: XRC error: 197: invalid row index 1: must be less than 1 After this error is displayed, I am able to...
View ArticlePostgreSQL Error Codes [on hold]
I’m configuring a monitoring tool to monitor a PostgreSQL 9.3 database error log and notify me whenever there are errors. Now I’m in the phase of understanding the difference between error codes. For...
View ArticleBetter way to select from nested tables in PostgreSQL
I have the following schema with millions of rows in the match table and each match have two sides (away and home). I want to create a view which shows the most significant data regarding the matches...
View Articleextract state changes from snapshot-based archive table
I have a table snapshot, storing snapshots (of the new state) every time an object stored in another live changed one of its attributes. I need to find all objects that changed a specific variable to a...
View ArticleOpen source UML modeling software (GIS)
I am wondering is there any opensource UML to Postgresql Mysql tables conversion software which also includes the geospatial datatypes ? Note:I want conversion from UML to database. and NOT...
View ArticleProblems restoring backup from base backup + WAL with WAL-E
I’m trying to do nightly restores of the main database on a separate node. I want to do weekly full restores and nightly restores by consuming the latest WAL files. On the master I have wal_level =...
View ArticleDisplay only table names in psql
How can I print only table names from a specified database in psql? That is, if I have tables called “table1″ and “table2″ then the output will be: table1 table2 and only that. I’ve been trying various...
View ArticleWhen to break large delete queries up?
I’ve got an auto generated join table (three columns, two of them keys to other tables), which was recently corrupted during an aborted migration. As a result there are around 1 million duplicate rows...
View ArticleForeign Key NULL vs Foreign Key to an empty string
This is a table for a catalog of medicines. Some have a pharmaceutical brand, others are generic (i.e. they will never have brand information) CREATE TABLE medicine ( id serial PRIMARY KEY, name text...
View ArticleMaximum sum() of overlapping ranges
Essentially my question is: how does one do aggregate operations involving overlapping ranges in PostgreSQL 9.3 (or 9.4)? The specific problem I have at hand is that given a range, I want to find the...
View ArticlepgRouting. pgr_ksp() returns -1 as id3
The documentation (http://docs.pgrouting.org/dev/src/ksp/doc/index.html) says that the result should be 0 for the last row. Is the same 0 than -1? I’m new on this. Thaks for the help.
View ArticlePostgres error [column must appear in the GROUP BY clause or be used in an...
I have two tables employee and phones. An employee can have 0 to n phone numbers. I want to list the employee names with their phone numbers. I am using the below query which runs fine. SELECT...
View ArticleGet ID which has two rows with different values for one column [closed]
Basically, I have a dataset that is a list of internal location identifiers attached to an ID (so each ‘set’ of geographical points has its own ID). So an ‘id’ column and a ‘location’ column exist in...
View ArticleIs C collation suitable for my Postgres database?
I am working with 500m rows (120GB) in Postgres 9.4, and I am trying to make SELECT statements as fast as possible. I am less concerned about the speed of INSERT and UPDATE, because my data only...
View ArticlePolygon intersection with LineString in PostGis
I have a table which contains GPS coordinates at certain times. I created a LINESTRING from them ordered from the oldest to newest. I also have a POLYGON and I would like to determine the subset of my...
View ArticleImported a new month of data, now getting Numeric data overflow error when...
We have an ETL job that brings in monthly revenue, and I’ve never experienced any issues with the data in terms of not being able to return results. The ETL job succeeded, but when I run a query to sum...
View Article