Category "postgresql"

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

regexp_matches, array per row

In PostgreSQL, I have a table as follow. | id | mycolumn | | -------- | -------------- | | 1 | /1/2/8/ | | 2 | /1/40/22/11/ |

Difference in jsonb and jsonb[] in postgresql

I have been working over jsonb columns in postgresql. My problem statement is to store array of json objects, so i thought of jsonb[] datatype as it is a viable

TypeORM OneToMany and ManyToOne relations cases 500 error on GET request

After adding OneToMany and manyToOne relations in the entities and doing GET request it shows in postman 500 error. // Car entity @Entity({ name: 'car' }) expor

Using array_agg with multiple DISTINCT Columns

In this query, I'm listing all users in organization 123 but I also want a column showing which other teams they are on across all organizations. My query right

Match any letter in a string

Table flights: ID Path 1 NZ:EU 2 JP:CA SELECT path FROM flights WHERE path ILIKE '%' || 'jpca' || '%' Above query isn't working, it needs to retu

Is there a way to set initial value for auto incremented column in typeorm?

I am using typeorm with postgresql. I want my auto incremented primary key column to start from specific initial value instead of 1. Is there any solution in ty

PostgreSQL timescale - How to sort rows by time and id?

I have data in my timescale database. If we only look at the "time", everything is fine. But if we look at the "id" we can see that 152 and 153 numbers didn't s

How to get what percentage of total users joined what number of meetings in PostgreSQL?

There are two tables, one is called "user_preference" that contains all users: id | firstname | lastname | email | And "match" which combines users with meetu

Interpolating variables in json string

I am using the code below to create a function with variables that updates a jsonb column with a json object or create it if it doesn't exist - With help from

Join with adding new row

I have a query which returns next table with name first_table: Name ID First 1 Second 2 And I need to join another table named second_table: ID ParentID 22 1

Grouping hour intervaled data into averages per day

I have a table with a starting time, finishing time and delivery columns. The starting and finishing times are of the timestamp without time zone data type (YYY

¿Is it possible to load packed decimal with streamsets?

I'm using StreamSets and will soon need to load data from fixed length file and packed decimal (cobol comp-3) to insert into Postgres to regular number numeric(