Category "postgresql"

What is the equivalent to Postgres's @@ to_tsquery(:searchQuery) in ElasticSearch?

We've migrated from a postgres database that was using vectors and using @@ to_tsquery(:searchQuery) to perform queries. We are now using ElasticSearch and havi

Whats missing on my Ruby 'Inverse Of' relationship

I know this topic has been addressed, but I have been at this for 2 days and I'm just stuck. I know inverse of does not create a new query, so should I use anot

is it possible to insert a gzipped string (Json string) as a varchar in postgres

Will I run into any weird byte sequence if I attempt to store a binary (a gzipped Json string) in a varchar column. Or Should I base64 encode it after compressi

Presenting summary information with splitting the value of a column

Is there a way to bring up the following with the table below: customer_id | loan_date | loan_amount | loan_paid | status ------------+------------+-----------

TimescaleDB high disk space usage despite compression activated

I have a TimescaleDB database running on Docker (which is running on Ubuntu). As you can guess, I store a lot of time-series data in it and to save disk space I

looping throught each row till the end of a 2d array of integer in postgresql

so basically I got a 2d array in a table. table SQL CREATE TABLE IF NOT EXISTS public.table_name ( "Person_Id" numeric(24,0) NOT NULL, "Items" integer[], ); so

How do I set up a postgres connection on airflow for the postgres operator

For the rtfm crowd, let me document my suffering. I went here: https://betterdatascience.com/apache-airflow-postgres-database/ But my ui has UNAUTHORIZED in pin

Using Postgraphile in nodeJS, how to enable aggregate max of date field?

I am using postgraphile in NodeJS for graphql API based on Postgresql database. I need to get max(date_field), but postgraphile does not provide that option by

Issue with docker and postgres, cannot run containers

Hi guys I have issue with docker-compose and postgres image. I am trying to use docker-compose(I am new to docker) for my API and postgres database. Her is how

How to create a SQL date range query where the date range depends on holidays and weekends?

I would like fetch all records in Postgres that match a particular date range. The column 'date' is of type Date. Return all rows where date is tomorrow's date

Get all rows from table and sort them by timestamp

I have these test tables which I would like to select and combine the result by timestamp: create table employees ( id bigint primary key,

Cypress Connecting to postgres database issue

running into a issue using cypress-postgres connecting to the database. Server has multiple databases along with multiple schemas. Tried multiple plugins, but c

How to do a take query with Query Builder?

I have a one to many relation on database. one productKind have many Product ProductKind.ts @Entity() export class ProductKind extends BaseEntity { @PrimaryGe

Postgres - How to surround parameter value with single quote

I want to delete data from the Postgres table which are older than n days. For which I am using the below-stored procedure, I want to pass n days via parameter,

buffers option ignored in aurora postgresql explain analyze command

i've just realized that in Aurora PostgreSQL 13, the "buffers" option in explain is being ignored. as you can see below, "Buffers: shared hit..." is missing fro

knex - postgres migrations on multiple schemas with same database

I am using postgres,knex and node.js in my project. There in my postgres database , I have two schemas. so when I'm doing knex migrations it works properly, but

How to call substring() with variables?

How to call the substring() function with variables for the start & count parameters? Below example code is not working. DO $$ declare v_idx numeric(3)

Is there any use for the pg_type type?

Is there any real world use for the type pg_type, i.e type ids 71 and 210. Although it's a bit of a faff, queries can result in this type output, as in the belo

Install Pgpool on a server different from the DB server

I have 3 server (PgPool-II installed) and 2 Db (PostgreSQL installed) server. I followed https://www.pgpool.net/docs/43/en/html/example-cluster.html But can't e

How pgpool-II getting node information?

I want to know where from pgpool getting those node information. I am getting node information using below command but unable to find from where it is getting t