Category "postgresql"

Strapi giving me DB errors in production, even though I'm using correct credentials

EDIT: I found a file at /config/database.js which is used to connect to sqlite in development. When I change the client name from sqlite to postgres, that's whe

Argument of type '{ title: string; }' is not assignable to parameter of type 'RequiredEntityData<Post>'

I'm learning from Ben's Awad video: Fullstack React GraphQL TypeScript Tutorial. I ran into a problem with typescript. I don't understand why compiler thinks t

PostgreSQL Can't Convert String to double precision

So I'm asked to do this query for a college project: SELECT l.city AS name, AVG((pr.ap_price::double precision * 7 - pr.weekly::doub

How to get total likes count of a post from supabase backend?

I have two tables one for post and one for likes. Post table stores all the post information. Likes table has 3 columns id, post_id user_id Now I need help to f

ERROR IN POSTGRESQL: aggregate function calls cannot be nested

I get "aggregate function calls cannot be nested" error from PostgreSQL. I tried different bunch of things but could not solve. sum( case when sum(

size of exported objects with pg_dump

I used pg_dump with the directory format (-d) to export a database containing more than a hundred tables. By comparing the .dat file for a table with its size i

SSL connection to the postgresql ASP.NET

I am trying to connect to a postgresql database through SSL. In the appsetting.json file, my connection string is "DefaultConnection": "Sslmode=Require;Sslrootc

No Data encryption option for Azure Database for PostgreSQL

Based on this documentation of Azure, there should be a Data encryption option under Security. But I don't see any option of Security. Is there a way to enable

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres

I'm trying to connect to a Postgres database with SQLAlchemy. I've installed psycopg2. However, I get the error sqlalchemy.exc.NoSuchModuleError: Can't load plu

Cannot boot Chainlink: opening db: failed to open db:

When I "chainlink node start", I get the error: "Cannot boot Chainlink: opening db: failed to open db: failed to connect to host=/private/tmp user=myname databa

how to restore postgreSQL 8.3 DB after unistall

I have unfortunately broken my old machine with postgres 8.3 on debian 6.0, I found a directory backup of postgresql database files, and i try to copy them on t

How can I get a tablename of a PostgreSQL cursor?

I know that in Oracle we can do something like select * from TABLE(DBMS_XPLAN.DISPLAY_CURSOR('$$SQL_ID')). But there is no sql id field in pg_cursors catalog. W

optimal way to stream trades data out of a postgres database

I have a table with a very simple schema: ( instrument varchar(20) not null, ts timestamp not null, price double precision

Compiling a JNI file with c++ postgresql in command prompt getting fatal error

Command executed: g++ -I"C:\Program Files\Java\jdk-16.0.2\include" -I"C:\Program Files\Java\jdk-16.0.2\include\win32" -I"C:\Program Files\libpqxx\include\pqxx"

odoo 11 Is there any difference if we take dump from Postgres and from Odoo Backup?

In odoo 11 which will be suggested backup and restore process, Dump and restore from postgresql or using Odoo to take backup and restore it. I want to know, whi

psycopg2.errors.InsufficientPrivilege: permission denied for relation django_migrations

What my settings.py for DB looks like: ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2',

Postgresql pg_dump for "invalid page in block" database does not work properly

We have setup database postgresql 11 on a system. There are about 8 tables. From few days, we are facing this problem ERROR: invalid page in block 9698 of rela

how to output 2 columns if i have 4 columns in postgresql and hibernate select c.name, c.email from Car c", Car.class, if

how to output 2 columns if i have 4 columns in postgresql using hibernate select c.name, c.email from Car c", Car.class if public class Car { @Id @GeneratedValu

How to rename a partitions table with child tables

I am trying to rename parent table in partitions. I created 3 child tables on year wise manner. I can alter the name of parent table but I don't know how to alt

Convert a list of enums and store as 'varchar[]'

Trying to figure out how to store a list of enums in a single table column. I started with a String and it worked. I'll show only the relevant parts of the code