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

Shooting star algorithm in postgres 8.4 and postgis1.4 showing fatal error...

When I try to run this shooting star algorithm, the postgis suddenly loosing connection to postgres and showing error no connection to server SELECT * FROM shortest_path_shooting_star(' SELECT gid AS...

View Article


How to turn off all RAISE NOTICE on production server?

I put a lot of RAISE NOTICE in functions for debugging purpose. I think this will affect performance, so they should be removed on production environment. Is there any way to opt-out those...

View Article


Prune unused joins

I have expected that selecting from a view would not join the tables from which I don’t query any values, but it doesn’t seem to be the case. I have a bunch of tables with the following structure:...

View Article

Query Multipolygon from PostGIS database

I my OSM PostGIS DB there are multiple polygons in the planet_osm_polygon table with the same osm_id, my idea is that this must be the parts of a Multipolygon. Now I want to query the Multipolygon by...

View Article

How is PostgreSQL extension feature compared to SQL Server extended and CLR...

I am new to PostgreSQL. If I am not wrong, SQL Server has similar mechanism – extended stored procedures for adding new functionality to the base SQL Server functionality. CLR stored procedures could...

View Article


UPPER Case issue postgreSQL when importing from text file

I have ruby and rails app, and I have cron task to download text file and import it to the database using copy hotels FROM 'db/ActivePropertyList.txt' DELIMITER '|' There is a header field which is...

View Article

Force View's query plan to update?

I have a View whose query plan appears to be cached, is there a way to force the View’s plan to be recalculated on each access?

View Article

Streaming replication in postgresql 9.1 — sender and receiver processes...

I’ve followed this guide, and cross-referenced the primary postgresql wiki in order to set up replication. I’ve configured postgresql.conf and pg_hba.conf as directed, and then restarted the master and...

View Article


String replace using concatenated strings from various columns

I’d like to remove a substring in a column via update statement. The substring to replace consists of multiple strings from other different columns but in strict order. The specification says:...

View Article


Error: Could not read Block X of relation base/Y/Z

We have some serious issues with our PostgreSQL-Server (Version 8.4). Our webapplication uses jdbc to connect to the PostgreSQL Server. Suddenly our webapplication cant connect to the PostgreSQL...

View Article

How to avoid large joins when determining which rows a user is authorized for?

Typical wep app situation: you have logged in users querying for resources exposed through an API. As a hypothetical example, company administrators quering for their employees’ time sheets: company...

View Article

How to import a text file with '|' delimited data to PostgreSQL database?...

I have a text file with | delimited data that I want to import to a table in PostgreSQL database. PgAdminIII only exports CSV files. I converted the file to a CSV file using MS excel but still was...

View Article

Image may be NSFW.
Clik here to view.

Postgres connection access denied on IPv6 address

Installed PostgreSQL 9.1 x64 on Windows, set up a listen address, but when connecting with pgAdmin I get the following error. Not sure why PostgreSQL is seeing my IPv6 address and not my regular IP...

View Article


Configuring PostgreSQL for read performance

Our system write a lots of data (kind of Big Data system). The write performance is good enough for our needs but the read performance is really too slow. The primary key (constraint) structure is...

View Article

What is the correct syntax for using gdal_rasterize with a PostGIS datasource

I have a multipolygon layer in PostGIS and I would like to use gdal_rasterize to generate a raster. I cannot find the correct syntax to specify PostGIS as the data source. $ gdal_rasterize -a...

View Article


What is the easiest one click install method for PostGIS and it's entire...

For someone new to database servers and their dependencies, what is the easiest assured way of installing PostGIS on a machine with no other software beyond what comes with its operating system? I’d...

View Article

Postgres: Given some parent id's how can I SELECT X child records for each?

In Postgres, if I have : Parent Table id, name 1, Parent1 2, Parent2 ..... 5, Parent5 Child Table id, parent_id, name 1, 1, Child1 2, 1, Child2 ..... 6, 2, Child6 ..... 25, 5, Child25 so 5 children for...

View Article


How to “analyze” a SQL query?

I’m not sure if I used the right term in my question. I am creating a prototype, which allows users to type in a raw SQL query, which will query the backend DB. I want to also make sure that users only...

View Article

Open source tool for creation of tables from csv files [on hold]

Is anyone familiar with an open source tool or a ddl creation wizard that does the data profiling of the import .csv file and offers creation of the postgres compatible table from it with suggested...

View Article

Postgresql socket not listening on the right one

I’m trying to get my postgresql to work. It is clearly running, according to: ps aux | grep postgres | grep -v grep I am getting - username 5781 0.0 0.0 2441364 524 ?? Ss 9:05AM 0:00.33 postgres: stats...

View Article
Browsing all 1138 articles
Browse latest View live