How to disable Postgresql messages translation

Is there a way to disable the Postgresql translation of messages? I´m running my appl and Postgresql on a pt_BR Windows machine and when a exception is thrown the error message is translated to...

Hibernate + PostgreSQL : relation does not exist - SQL Error: 0, SQLState: 42P01

I am having some problems trying to work with PostgreSQL and Hibernate, more specifically, the issue mentioned in the title. I've been searching the net for a few hours now but none of the found...

Bulk/batch update/upsert in PostgreSQL

I'm writing a Django-ORM enchancement that attempts to cache models and postpone model saving until the end of the transaction. It's all almost done, however I came across an unexpected difficulty...

'password authentication failed for user "postgres"'

I have installed PostgreSQL 8.4, Postgres client and Pgadmin 3. Authentication failed for user "postgres" for both console client and Pgadmin. I have typed user as "postgres" and password...

String sort order (LC_COLLATE and LC_CTYPE)

Apparently PostgreSQL allows different locales for each database since version 8.4 So I went to the docs to read about locales (http://www.postgresql.org/docs/8.4/static/locale.html). String sort...

Using a single SQL correlated sub-query to get two columns

My problem is represented by the following query: SELECT b.row_id, b.x, b.y, b.something, (SELECT a.x FROM my_table a WHERE a.row_id = (b.row_id - 1), a.something != 42 ) AS source_x, ...

Split comma separated column data into additional columns

I have comma separated data in a column: Column ------- a,b,c,d I want to split the comma separated data into multiple columns to get this output: Column1 Column2 Column3 Column4 ------- ...

PostgreSQL pgp_sym_encrypt() broken in version 9.1

The following works in PostgreSQL 8.4: insert into credentials values('demo', pgp_sym_encrypt('password', 'longpassword')); When I try it in version 9.1 I get this: ERROR: function...

Hashing a String to a Numeric Value in PostgreSQL

I need to Convert Strings stored in my Database to a Numeric value. Result can be Integer (preferred) or Bigint. This conversion is to be done at Database side in a PL/pgSQL function. Can someone...

Importing CSV with commas in string values

I am trying to import a trivial CSV to Postgres 8.4 database: Here is a table: CREATE TABLE public.sample ( a VARCHAR, b VARCHAR ) WITHOUT OIDS; Here is a CSV file sample: "foo","bar,...

How to add "on delete cascade" constraints?

In PostgreSQL 8 is it possible to add ON DELETE CASCADES to the both foreign keys in the following table without dropping the latter? # \d scores Table "public.scores" Column | ...

How do I get tables in postgres using psycopg2?

Can someone please explain how I can get the tables in the current database? I am using postgresql-8.4 psycopg2.

PostgreSQL won't start: "server.key" has group or world access

Whenerver I start PostgreSQL using command: $ sudo /etc/init.d/postgresql start Pg doesn't start up. The error reported is: * Starting PostgreSQL 8.4 database server * The PostgreSQL server...

PostgreSQL: between with datetime

I use PostgreSQL 8.4.11 and find strange error. When I query: SELECT "documents_document"."given_on" FROM "documents_document" WHERE (EXTRACT('month' FROM "documents_document"."given_on") = 1 ...

Generating a UUID in Postgres for Insert statement?

My question is rather simple. I'm aware of the concept of a UUID and I want to generate one to refer to each 'item' from a 'store' in my DB with. Seems reasonable right? The problem is the...

What to use as a NOOP in PostgreSQL?

I have need of a placeholder while I develop some stored procedures in PostgreSQL 8.4. I'd typically use some sort of executable noop (one that's not going to generate an error when an attempt is...

how to exclude null values in array_agg like in string_agg using postgres?

If I use array_agg to collect names, I get my names separated by commas, but in case there is a null value, that null is also taken as a name in the aggregate. For example : SELECT g.id, ...

How to get the total number of tables in postgresql?

Is there any way by which I can get the total number of tables in a Postgresql database? The postgresql version I'm using is PostgreSQL 8.4.14.

Using psql to connect to PostgreSQL in SSL mode

I am trying to configure ssl certificate for PostgreSQL server. I have created a certificate file (server.crt) and key (server.key) in data directory and update the parameter SSL to "on" to enable...

Hibernate QueryException: 'Not all named parameters have been set' - with native query containing ::int

in our current project we need a query of the long-matching-prefix type but the column was oddly enough defined as bigint. We came up with the solution in the snippet below, where we want to find...

Fetch records that are non zero after the decimal point in PostgreSQL

I have a table with an amount field of type Numeric. It contains different amount values. For example 5.00 7.13 8.86 6.00 1.00 ... etc. I've to fetch only those records that are nonzero after...

BCrypt.checkpw() Invalid salt version exception

I'm trying to implement authentication using BCrypt, in my Play 2.1. Java application, but I'm getting Invalid salt version exception when I'm trying to authenticate the user. This is my stack...

PSQLException: FATAL: database "mydb" does not exist

I'm having a weird problem with my app trying to connect to PostgreSQL with Jdbc driver version: 8.4-702.jdbc4 It seems it can't find the DB defined in the persistence.xml where it's...

Add a column to a table in all schemas of a PostgreSQL database

I have a Postgres 8.4 schema like below: My_Database |-> Schemas |-> AccountA |-> AccountB |-> AccountC |-> AccountD |-> AccountE ... |->...

PostgreSQL: encoding problems on Windows when using psql command line utility

I'm working in a centralized monitoring system on Windows 2008 R2, I have installed a PostgreSQL 9.3 to use psql from the command line. When I try to access to some remote Postgres (an 8.4 in my...

ERROR: must be superuser to alter superusers

Unfortunately, I have removed super user privileges from postgres user in PostgreSQL. And currently I have not any super user in PostgreSQL. And i want to make superuser. So how can i make it ?...

postgreSQL 8.4. Error connecting to the server: FATAL: the database system is in recovery mode

I really need someone's help with this error in postgreSQL. I have postgres installed on Windows Server 2008 R2. I'm trying to connect to it using pg-admin, some custom C# and another third-party...

Failed to load sql modules into the database cluster during PostgreSQL Installation

I have attempted to install PostgreSQL 9.4 and 8.4 multiple times and it is failing no matter what I have tried. I am attempting to install on Windows 7 SP1 x64. After each failed install I have...

Improve postgreql insert performance when compared to Oracle. Low memory utilization by Postgresql threads

I am trying to improve the performance of Postgresql (version 9.2.3) inserts for a simple table with 1 bigint, 1 varchar, 1 float and 2 time stamps. A simple replication of my JDBC program is...

Docker Image > 1GB in size from python:3.8.3-alpine

I'm pretty new to docker and, although I've read lots of articles, tutorials and watched YouTube videos, I'm still finding that my image size is in excess of 1 GB when the alpine image for Python...