Category "postgresql"

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

connection error when trying to connect postgres database to vscode

I have an issue when I try to establish a connection with my Heroku database through the PostgreSQL extension in VScode. I type in all the credentials informati

PostgreSQL query slow when adding EXTRACT ISODOW

I have a large table(117 899 162 rows) the query below is very slow but if I remove EXTRACT(ISODOW FROM l2.starttime) IN (1) the performance is alot better. I g

Postgres transaction table with Billion rows and multiple JSON columns

So we have a new project where we need to use postgres 14 to scale up a transaction table that gets heavily updated. The Master table has about a 60 million row

How to execute SELECT with params in DataGrip / PgAdmin etc..?

I need to execute a complex query for testing purposes with params. How to write a SELECT query which can be executed in DataGrip / PgAdmin with params: EXECUTE

Graphql - how to omit tables from the auto-generated graphiql

Im working on postgraphile server. the stack is: nodejs, expressjs, postgraphile and knex. My auto-generated graphiql exposes queries to tables it doesn't need

Querying from BigQuery to Python

I'm trying to query data to bigquery with this code as mentioned in google docs: from google.cloud import bigquery client = bigquery.Client() tab = client.query