Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
90 views

There are 2 tables 'users' and 'address'. create table address ( username varchar(255) not null, address1 varchar(255), primary key (username) ) and create table users ...
1 vote
1 answer
86 views

ALTER TABLE my_table ADD date date GENERATED ALWAYS AS ((timezone( 'Asia/Kolkata'::text, COALESCE( timestamp_with_timezone_1, timestamp_with_timezone_2 ) ))::date) STORED; I get the ...
Shh's user avatar
  • 1,026
0 votes
2 answers
193 views

I'm looking for a simple and nice and blocking way to get an exclusive lock: SELECT pg_advisory_lock(hashtext(lock_id)); Is there a way to fail if more than X number of attemptors are trying to get ...
0 votes
1 answer
85 views

We have this query: WITH childObject AS ( SELECT JSONB_BUILD_OBJECT( 'childObjectId', ( SELECT values_table.value::text FROM ...
1 vote
3 answers
144 views

I currently have this SQL: select ROW_NUMBER() OVER (order by priority DESC NULLS LAST, created_at DESC) as index , id , title , ago(created_at) ,...
1 vote
1 answer
57 views

This is my query: SELECT COUNT(*) , DATE(created_ts) FROM users GROUP BY DATE(created_ts); if the user selects a time range, such as 2024年12月17日 00:00:00-2024年12月17日 15:59:59 but a problem arises ...
loyoqq's user avatar
  • 11
0 votes
1 answer
41 views

I'm using Postgres. I want to have a row always on top (example alias = 'abc') in a query regardless of the offset being used. Right now, I'm doing ORDER BY CASE WHEN alias = 'abc' THEN 0 ELSE ...
0 votes
0 answers
77 views

I've got a large table (25M rows, 30GB) that needs to have a large amount of foreign keys set to a new table that I've just added. I've prepared a temporary table that holds the primary key ID of the ...
0 votes
1 answer
352 views

Using PostGres 15.5 My table looks like this: CREATE TABLE IF NOT EXISTS directory_network_entity ( id varchar(70) NOT NULL, country_code_2 varchar(2) NOT NULL, country_name varchar(50) NOT NULL,...
0 votes
0 answers
41 views

I can't seem to find the reason for the below error log: [2024年03月07日 16:28:32] local.ERROR: could not find driver (Connection: postgres, SQL: insert into "failed_jobs" ("connection"...
0 votes
0 answers
62 views

We’re using postgres community version 15 on suse linux 15.3 . We have enabled system config file and started the database. But while we try to auto discover the server in Postgres Enterprise Manager ...
1 vote
1 answer
360 views

I have two partitioned tables with similar range partitions (where date_key is a date in integer form -- like 20230901 for Sep 1st, for example: create table header ( date_key int, header_key ...
LanceB's user avatar
  • 58
1 vote
1 answer
1k views

Besides these potential, documented causes: a deadlock hitting statement_timeout for a unique index: a uniqueness violation for expression and partial indexes: expression evaluation errors Are there ...
0 votes
1 answer
199 views

I'm new to Postgres and i have been creating table's using C program, so now I have run into a issue where a updated row is moving or shifting to the last row of the table and I have to prevent this ...
1 vote
2 answers
386 views

Asking this question for a colleague who ran into this behaviour with PostgreSQL. Hoping somebody out there can solve this puzzle for us. The following logs Rows updated: 3 when run: drop table if ...

15 30 50 per page
1
2

AltStyle によって変換されたページ (->オリジナル) /