postgresql-12

Statement logging in PostgreSQL 12.1. Has something changed from earlier versions?

丶灬走出姿态 提交于 2021-02-11 14:34:20
问题 I'm debugging some code that uses SQLAlchemy to interact with a PostgreSQL database. The errors I'm seeing suggest that PostgreSQL is receiving my SQL statements, but perhaps not in the order I intended. So, I thought I'd enable statement logging to see what PostgreSQL is actually getting. I did that a few years ago, using the instructions in How to log PostgreSQL queries? and it worked just fine. (It must have, because I upvoted that question and the accepted answer.) However, that was

Why is my Postgres database working for a while and then not able to “start server” once restarted?

余生长醉 提交于 2021-02-11 14:23:39
问题 Recently, I've started playing around with an old Raspberry Pi 3 b+, and I thought it would be good practice to host a Postgres database on my local network and use it for whatever I want to work through. I understand that running Postgres on a Raspberry Pi with 1GB of memory is not ideal and can take a toll on the SDcard, but I've updated the postgresql.conf file and specified that the data directory path is to utilize a 1TB SSD. Additionally, I've installed zram and log2ram to try and curb

PostgreSQL uninstall on Windows

[亡魂溺海] 提交于 2021-01-29 18:03:21
问题 In the process of upgrading from PostgreSQL 11 to 12 on Windows, I uninstall PG-11 using the uninstall.exe, wait for like 15 seconds (to make sure that the uninstall.exe is complete), delete the bindir (if exists) and then install the Postgres-12.exe. This all is done in a batch file and the code looks something like: uninstall-postgresql.exe --mode unattended PING 1.1.1.1 -n 15 >NUL if exist C:\PostgreSQL\bindir RD /Q /S C:\PostgreSQL\bindir postgresql-12.1.exe --servicename Postgres -

PostgreSQL: Delete key/value pair from array with json objects

孤街醉人 提交于 2021-01-28 02:07:04
问题 I have a table: CREATE TABLE movies( id text, data jsonb ); INSERT INTO movies(id, data) VALUES ( '1', { "actors": [ { "name": "actor1", "email": "actor1@somemail.com" }, { "name": "actor2", "email": "actor2@somemail.com" } ] } ); What I want is to delete the email field (key + value) from each json object of the actors array. I've tried the following solution and although it does execute, it doesn't have any effect on the array at all: update movies set data = jsonb_set(data, '{actors}',

Mikro-orm error: password authentication failed for user “postgres”

霸气de小男生 提交于 2021-01-01 04:33:23
问题 I'm trying to code along this React GraphQL TypeScript tutorial The project uses MikroOrm to communicate with a PostgreSQL database. I have PostgreSQL(12.4) installed on my Ubuntu 18.04, created a "postgres" user and I can log in to the user and run psql without any problems. However, when I start using mikro-orm commands like npx mikro-orm migration:create (video timestamp), I get the following error: error: password authentication failed for user "postgres" at Parser.parseErrorMessage (

Mikro-orm error: password authentication failed for user “postgres”

旧巷老猫 提交于 2021-01-01 04:32:25
问题 I'm trying to code along this React GraphQL TypeScript tutorial The project uses MikroOrm to communicate with a PostgreSQL database. I have PostgreSQL(12.4) installed on my Ubuntu 18.04, created a "postgres" user and I can log in to the user and run psql without any problems. However, when I start using mikro-orm commands like npx mikro-orm migration:create (video timestamp), I get the following error: error: password authentication failed for user "postgres" at Parser.parseErrorMessage (

Windows Docker container Networking to Postges on host (windows 10) [duplicate]

一世执手 提交于 2020-12-15 06:40:06
问题 This question already has answers here : Docker container to connect to Postgres not in docker (2 answers) Closed 11 days ago . OK.. Sorry to clog up this site with endless questions. I have a .NET REST API that works in DOCKER. (Windows container) But, the moment I try to connect to Postgres on my host I am unable to connect. I get unable to connect, request timed out, connection was actively refused... I have modified my connection string over a thousand times trying to get this to work.

How to count related rows including subcategories?

陌路散爱 提交于 2020-06-16 17:24:13
问题 I've got a few tables in a Postgres 12.3 database. The first one is named category : id|template_id|name |entry_count|is_base_template|can_rename|can_delete|section|userId|parentCategoryId| --|-----------|---------------|-----------|----------------|----------|----------|-------|------|----------------| 1| |Notes | 0|true |true |true |A | | | 2| |ToDo | 0|true |true |true |A | | | 3| 1|Notes | 0|false |true |true |A | 1| | 4| 2|ToDo | 0|false |true |true |A | 1| | 5| |Must Do | 0|false | | |A

PostGIS extension undefined symbol: GEOSCoordSeq_getXY

只愿长相守 提交于 2020-03-04 23:03:48
问题 I am trying to create postgis 3.0 extension on postgresql12 on centos7 (both are installed using yum native rpms) yum install postgis30_12.x86_64 but i am getting different errors with GEOS. currently the error i am getting is postgres=# create extension postgis; ERROR: could not load library "/usr/pgsql-12/lib/postgis-3.so": /usr/pgsql-12/lib/postgis-3.so: undefined symbol: GEOSCoordSeq_getXY geos-config --version 3.8.0 回答1: The PostGIS binary you are using was built with a GEOS version that

How to deal with a text[] array field type in Npgsql?

半腔热情 提交于 2020-02-29 08:04:59
问题 I have a Postgres 12 database with a single table: CREATE TABLE public.messages ( sender text COLLATE pg_catalog."default", "timestamp" timestamp with time zone, message_id bigint, text text COLLATE pg_catalog."default", priority bigint, parameters text[] COLLATE pg_catalog."default" ) Now, when I want to use this table in met .NET Winforms (not .NET Core) application by right-clicking the project, add new item, ADO.NET Entitity Data Model, EF Code First from Database, configuring my