Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
155 views

I have two owners in my postgresql database e.g. testdb, I have some tables of owner1 and some tables of owner2. I am facing issue in setting replica identity full for tables of owner1 using owner2 ...
Neeraj Kumar's user avatar
0 votes
1 answer
37 views

I need to derive a few fields based on below input data. I have 2 input tables: Table 1: badge l1_mgr_id l2_mgr_id l3_mgr_id l4_mgr_id l1_mgr_name l2_mgr_name l3_mgr_name l4_mgr_name cost_center 12 ...
user26309744's user avatar
0 votes
0 answers
100 views

I have a table accounts_coin with unique constraint on (type, id), but it still have two rows with same value of (type, id), this image shows the problem: click information might help: postgres ...
darkframexue's user avatar
0 votes
1 answer
119 views

Just general question, can anyone pls help how to perform left join on union data. I have query where I am doing union of data(using table1 and table2) based on few conditions now I need to perform ...
Ram's user avatar
  • 287
1 vote
1 answer
112 views

I'm using a stored procedure to get the total query execution time in PgAdmin. Based on some readings, I tried the following: DO $proc$ DECLARE StartTime timestamptz; EndTime timestamptz; Delta ...
Addisu Foryou1's user avatar
1 vote
1 answer
118 views

I would like to write a Select query where I can see if one column is like part of another column in different table postgresql. tblNames1: ID Description target table 1 select test....
Ram's user avatar
  • 287
0 votes
0 answers
136 views

Is there a way to specify the order of unnesting a string from an arrary? I'm building a report in sql that takes a description of a baseline_intake_form for cars and takes the response the customer's ...
Juice_n_jingles's user avatar
0 votes
2 answers
306 views

In mysql when I enter the following mysql -u root -p Password: enter password successfully I then get into my local server and from here I can view all my databases using SHOW DATABASES. But when I ...
Bop 1ABot's user avatar
0 votes
1 answer
46 views

I have a tune table that stores SOAP requests. Some parts of the query are constant, some parts are variable. To get the values of the variables, i need to perform another select whose text is stored ...
Babo's user avatar
  • 17
0 votes
1 answer
971 views

I apologize in advance for my English. I'm new to programming. There is a problem with stored procedures in PostgreSQL. I have a table: CREATE TABLE user ( Id serial, idGroup INTEGER, ...
newbloom's user avatar
0 votes
2 answers
620 views

I have created a table like this CREATE TABLE IF NOT EXISTS public.table_name( id SERIAL PRIMARY KEY, user_id int4 NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), ); SELECT ...
Adnan Sabbir's user avatar
0 votes
0 answers
38 views

I have more than 50 million rows and its taking hours to get this query done: select distinct column_1 from table_1 where "colour" = 'red'; I tried this: WITH RECURSIVE cte AS ( ( ...
user20777609's user avatar
-2 votes
1 answer
265 views

UPDATE s SET sb = sb || ('{"filded": [{"@value": ' || sb@>>'{filded,0, @value}'::integer + 1 || '}],"lastFailure &...
vivek kumar's user avatar
0 votes
3 answers
47 views

I have a table: evt_type | value | time ------------+------------+-------------------- 2 | 5 | 2015-05-09 12:42:00 4 | -42 | 2015-05-09 13:19:57 2 ...
Mosky1970's user avatar
0 votes
1 answer
88 views

Run in a PL/pgSQL a function to return N columns and put in a view or something that allow to get the table with the N column updated without human intervention. Using the below code from: create ...
C'perota's user avatar
1 vote
1 answer
79 views

I have a table like this, and there are three cases, ## case a | rec_no | read_time | id +--------+---------------------+---- | 45139 | 2023-02-07 17:00:00 | a | 45140 | 2023-02-07 17:15:...
hong's user avatar
  • 13
0 votes
1 answer
240 views

I am having migration from teradata to greenplum and there is a string concatenation with regex_substr which is not existing at Postgres 9.4 version. The part of the existing code is: TRIM(COALESCE(...
statlad's user avatar
  • 128
0 votes
0 answers
125 views

Want to delete data from multiple tables. As i understood, there is no way to do it via join/using in Postresql (currently 9.4). It is possible to delete only from one table at a time. Trying like ...
Roman Khoroshev's user avatar
2 votes
1 answer
1k views

So I am creating external table in greenplum based on the table i have in postgres. And When I create field field_name uuid I am getting an error "Field type UNSUPPORTED_TYPE" Same goes to ...
Vlad Vlad's user avatar
  • 210
0 votes
0 answers
34 views

This my trigger that will trigger if new value is inserted in origin. I want to store the result of recursive to table(extract). I get this error ERROR: syntax error at or near "perform" ...
E postgre's user avatar
0 votes
0 answers
182 views

I am using DBeaver tool for import csv file into postgres database. When Iam trying to import csv file which is having column (inet datatype) as null. Then I am getting the below error. Please let me ...
Jagdish's user avatar
1 vote
1 answer
87 views

I Created the next Trigger to move the data from a main table to an historical table in case of an update or insert. CREATE OR REPLACE FUNCTION process_employee_hist() RETURNS TRIGGER AS $...
user avatar
3 votes
0 answers
1k views

I'm new to PostgreSQl. I'm trying to add new values to type if type exists: ALTER type ProcessStatus ADD VALUE IF NOT EXISTS 'Processing'; Above query will add 'Processing' to type ProcessStatus, but ...
reddy's user avatar
  • 101
1 vote
2 answers
1k views

I would love to be able to validate objects representing table rows using the database's existing constraints (triggers that raise exceptions and checks) without actually inserting them into the ...
George's user avatar
  • 4,154
0 votes
0 answers
63 views

I need pl/sql return count of the table .. pass by reference the name of table and name of field i´m using: -- Function: fn_post_gera_chave_numerica(character varying, character varying) -- DROP ...
Claudio Lohse's user avatar

1
2 3 4 5
27