Skip to main content

All Questions

1 vote
2 answers
51 views

How to pass a list of locations (longitude, latitude) to a PostgreSQL/PostGIS stored function?

I have prepared a DB fiddle for my questions and also list my SQL code below. I have created a countries_boundaries table, which I intend to fill with .poly files provided at Geofabrik: CREATE ...
Alexander Farber's user avatar
0 votes
0 answers
35 views

Postgres stored procedure returning blank string for OUT parameter

I have a stored procedure in Postgres which I'm calling from VBA (or PowerShell). On one machine after executing the stored procedure, the OUT parameter contains the value set in SQL. On another ...
user21141188's user avatar
1 vote
0 answers
63 views

"42883: procedure usp_delete_announcements(integer) does not exist" while calling stored procedure with out paremeters from .NET Core

I am trying to call a PostgreSQL stored procedure with OUT parameters from my .NET Core 3.1 API to delete a record based on an ID. However, when I attempt to execute the stored procedure with OUT ...
yaminisai's user avatar
0 votes
1 answer
45 views

Trouble groking correct transaction handling in postgresql (16.x) procedures

I think I'm close to getting this, and as I type it I may have answered my own question, but basically what is the proper way to create a procedure for PostgreSQL that is intended for occasional ad-...
Chris's user avatar
  • 174
0 votes
0 answers
46 views

How to pass a user-defined table type (UDT) to a PostgreSQL stored procedure using C# and Npgsql?

I'm trying to pass a user-defined table type (UDT) to a PostgreSQL stored procedure using C# and Npgsql. Here are the details - PostgreSQL composite type definition: CREATE TYPE public....
ravikiran reddy's user avatar
3 votes
2 answers
101 views

Why is DELETE FROM vehicle_data WHERE NOW() > expires_at; failing in my stored function?

I have prepared a DB Fiddle for my question and I will also show my complete code below - I am trying to store data in a vehicle_data table and each data record has an expires_at column: -- Create ...
Alexander Farber's user avatar
0 votes
0 answers
104 views

aws_s3.table_import_from_s3 returns error

Attempting to import CSV to postgres table, I got this error. ERROR: missing data for column "b" CONTEXT: COPY test, line 2: "<Error><Code>AccessDenied</Code><...
Mohamed Thowfeeq's user avatar
1 vote
0 answers
44 views

Issue with sending list of objects to a PostgreSQL procedure using ADO.NET

I have created a user type in the postgresql: CREATE TYPE usertimelogtype AS ( employeeno TEXT, facilityid INTEGER, activitydate DATE, duration INTEGER); I have ...
Prabhath Kumar Rayabarapu's user avatar
0 votes
0 answers
41 views

Postgresql Procedure not getting called from spring boot 3.3 but database connection has established successfully

I am not able to call a stored procedure from Spring Boot 3.3, but I am able to establish a database connection use fetch queries. When calling the stored procedure, I am getting this error: Error ...
Swaraj's user avatar
  • 9
2 votes
1 answer
261 views

Why I am unable to rollback my transaction to particular savepoint in plpgsql stored procedure

I am getting error while executing stored procedure on pgadmin at "To" in "Rollback to Savepoint". CREATE OR REPLACE PROCEDURE demo8() AS $$ BEGIN INSERT INTO statefis VALUES(83,...
Pruthviraj Desai's user avatar
0 votes
1 answer
36 views

Execute function from procedure, the name of function stored in table column

Table condition: This table contains function name in the column fn_name create table condition(id int,name varchar(50),fn_name varchar(50)); Data: insert into condition values(1,'check id','...
MAK's user avatar
  • 7,295
-1 votes
1 answer
52 views

Postgres Stored Procedure - filtering table with multi condition

Hi I am trying to create procedure which filters data and returns table. Also my column names includes double quotes (i.e "Country","date") my code is as follows create or replace ...
san1's user avatar
  • 511
0 votes
1 answer
303 views

PostgreSQL Trigger Procedures Asynchronously From Main Overall Procedure

I am currently working on building a pipeline using a PostgreSQL DB hosted by AWS RDS. In my pipeline, I have a stored procedure in PostgreSQL that is triggered by cron and used to executed other ...
JMV12's user avatar
  • 1,055
0 votes
1 answer
97 views

Language plpgsql not supported for CREATE FUNCTION

I have created a function in redshift. But it is throwing an error of language plpgsql not supported for create function. How do I resolve this? Expected other languages but didn't work. Also I tried ...
True Gentleman's user avatar
1 vote
1 answer
122 views

Fetching data from cursor from Postgres stored procedure via ODBC in C

Thank you for your help in advance. I've got a simple SP in Postgres: CREATE OR REPLACE PROCEDURE TEST_SP(INOUT _result_one refcursor = 'rs_resultone') LANGUAGE plpgsql AS $$ BEGIN open _result_one ...
Radek Matras's user avatar

15 30 50 per page
1
2 3 4 5
80