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

Import binary database file into postgres

I have a quite newbie question that I do not know if is possible or not: I had to format my computer, and the only way to keep my postgres database was accessing to data with my folder browser...

View Article


Index on integer column not helping. Help? (EXPLAIN ANALYZE output inside)

The table market_trades has an integer column market_id which takes values from 1 to 5. This seems like a pretty straightforward query to get the number of trades on each market: WITH markets AS (...

View Article


postgresql cannot drop a table when autovacuum holds lock on it

Autovacuuming process holds RowExclusiveLock and ShareUpdateExclusiveLock on the table, which I want to drop. I read that autovacuum should be canceled automatically, when submitting DROP TABLE...

View Article

Google Streetview Images in infowindow

I have followed the instructions on this blog post on adding streetview images to the infowindow: http://blog.cartodb.com/a-picture-is-worth-1-000-attributes-infowindows-with/ I can do it without a...

View Article

How to get pg_archivecleanup on Amazon Linux 2014.03?

I have an Amazon EC2 instance based on Amazon Linux AMI 2014.03. I installed PostresSQL from their repos: yum install postgresql-libs postgresql postgresql-server postgresql-devel I’ve read about...

View Article


Image may be NSFW.
Clik here to view.

Connecting to ArcGIS Desktop PostgreSQL database (running locally)

I know this is a total noob question but then again, when it comes to PostgreSQL I am a total noob… I have installed the OpenGeo suite on my computer, running Windows 7, 64-bit. I have downloaded the...

View Article

Is 'internallength' always useful in custom type definition in Postgres?

In our database we use a custom type to store 3D locations: CREATE TYPE float3d AS ( x real, y real, z real); In many examples I see INTERNALLENGTH used as a parameter with the definition of custom...

View Article

Find all values not present for other values of other column

Let’s suppose I have a table with integer columns a and b (each pair (a,b) is unique) and following data: a | b ------- 1 | 2 1 | 3 1 | 4 1 | 5 2 | 1 2 | 3 2 | 4 3 | 1 3 | 3 Now I need to get all the...

View Article


Explain PostgreSql ssl_cipher values: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH

In the postgresql.conf file, one can configure authorized values for ssl_cipher. Yet I could not find documentation explaining what the ALL, ADH, LOW, EXP, MD5 and STRENGTH values correspond to. MD5...

View Article


Why can a new user select from any table?

When I create a user in Postgres, create user test with password 'test'; The user ends up being able to connect to every database in the instance. The user can also select from any table: # psql -h...

View Article

Understanding postgres prompts

What is the difference between postgres=# and postgres-#? I tried googling it and looking on the official site but could not get a hit for the symbols.

View Article

Storing generated documents that can not be updated by changes in relationships

I have a system running with PostgreSQL and Yii Framework, which generates a few medical documents that, once ready, can’t be changed. For example: If my full name comes out on this document today, and...

View Article

Removing all columns with given name

I am converting a MSSQL schema to PostgreSQL and in that schema most tables have a column called Timestamp that are of MSSQL timestamp datatype which is effectively rowversion. When inserting records...

View Article


Selecting aggregated string from database

I have a table in my database consisting of one column which is NewLanguage(varchar). I insert new languages to the table and I want to select the rows of the table and assign them to a string variable...

View Article

Fast hamming distance queries in postgres

I have a large database (16M rows) containing perceptual hashes of images. I’d like to be able to search for rows by hamming distance in a reasonable timeframe. Currently, as far as I properly...

View Article


Understanding pg-pool in details

I have following problem regarding the pg-pool (3.3.3) When master fails, automatic failover happens and standby is promoted to master. But this new master don’t have any replicators. Other slave...

View Article

Where is psql connecting?

TL;DR: It was a network issue. Read the updates at the bottom for what I found. Typing psql, I can connect: $ psql psql (9.3.2) Type "help" for help. ben=# Typing psql -h localhost, I can’t connection:...

View Article


group by clause without aggregate function

I’ve always assumed GROUP BY was designed specifically for aggregate functions and in all other circumstances you should use ORDER BY. For example, we have three tables: orders, shippers, and...

View Article

Image may be NSFW.
Clik here to view.

How do I maintain high INSERT-performance on PostgreSQL

I’m working on a project which is parsing data from measurement files into a Posgres 9.3.5 database. At the core is a table (partitioned by month) which contains a row for each measurement point:...

View Article

Storing DB credentials in an application source code?

I am making an app which connects to a DB, and the app will have plenty different userslogins. Is it a good design choice to have a specific DB login/password for the application, using which the...

View Article
Browsing all 1138 articles
Browse latest View live