Skip to main content

All Questions

0 votes
0 answers
144 views

PostgreSQL synchronous stored procedure execution calls from Django Backend

We have 5 PostgreSQL stored procedures and we need them to be chronologically executed in order. We have them listed in one stored procedure: CREATE PROCEDURE main(input_file_path varchar) LANGUAGE '...
SDido's user avatar
  • 17
0 votes
1 answer
123 views

Error when calling Procedure from Django: No procedure matches the given name and argument types

I want to call a stored procedure installed in our PostgreSQL database via our Django backend. According to this stack question in order to call a procedure from Django we have to type it in a file ...
SDido's user avatar
  • 17
0 votes
1 answer
2k views

Update Redis cache value from PostgreSQL

I am working on a Python project and I have a requirement that whenever a row is inserted, updated, or deleted in a PostgreSQL table, the corresponding value should be updated in Redis. I am working ...
jps's user avatar
  • 1
0 votes
1 answer
73 views

Unable to Loop Over Nested Dictionary in Stored Procedure: Psycopg2

I'm trying to add the values of a nested dictionary within a list to a table using a stored procedure in psycopg2. This is the schema I receive from a JSON application: [ { "team_id&...
clattenburg cake's user avatar
1 vote
1 answer
57 views

SQL Alchemy hybrid_property with stored procedure

I am using SQLalchemy with postgresql, and wrote a procedure on my database, called calculate_validation_for_file(self.versionId) Now, I want to write a hybrid_property that would automatically call ...
Radu Nicoara's user avatar
0 votes
1 answer
208 views

How to pass NULLs in array to Postgres stored procedure using pg8000?

In Python 3.8 I'm using pg8000 1.21.3 to call a Postgress 11 stored procedure which takes as an argument a custom data type array. Here is the working proof of concept schema and stored procedure: ...
Javide's user avatar
  • 2,657
0 votes
2 answers
1k views

Python3 print entire output from 'raise notice' from stored function in Postgres?

I'm trying to generate documentation from database from stored functions from postgres with python - all tables and columns contains comments. To do this I found possibility how to print from function ...
baziorek's user avatar
  • 2,694
1 vote
1 answer
539 views

What is the equivalent of datetime.datetime.now() in postgres?

I have my code and want to return the current time in SQL (I'm using postgres). procedure = PGFunction( schema="public", signature="in_out(_profile_id integer, _item_id integer, ...
ms360's user avatar
  • 11
0 votes
0 answers
792 views

Python/SQLAlchemy calling Stored Procedure(Postgres) with parameter

I'm trying to understand what is wrong with this code: from flask import Flask from flask_sqlalchemy import SQLAlchemy con_str = 'postgresql://user:password@IP_PostgresDB:5432/base' app = Flask(...
Fperuso's user avatar
  • 21
1 vote
0 answers
125 views

Python cursor notice postgres reset

It's possible to reset Notice by postgresql for each call at stored procedure? That's my code: ..... connection = db.engine.raw_connection() connection.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT) ...
Damiano Dotto's user avatar
0 votes
1 answer
658 views

call store procedure using callproc do not really implement in postgresql?

I have python 3.7 with postgresql: import psycopg2 ... @app.route('/add', methods=['POST']) def add(): cur = get_db().cursor() if request.is_json: jdata = request.get_json() ...
user504909's user avatar
  • 9,559
0 votes
1 answer
258 views

Getting wrong Output from PostgreSQL Procedure/Function in Django API

I have my database and all its procedures ready in PostgreSQL. I previously used Laravel as backend of my API and all the procedures were working correctly and returning the correct output. My Laravel ...
Hussain Abdullah's user avatar
0 votes
0 answers
276 views

Postgres procedure not updating selected row

I'm working on a Django application that uses Stored Procedures on a PostgreSQL database. I'm stuck in a very strange (for me, at least) problem. I have the following SP code: create procedure ...
Thiago Mambretti's user avatar
0 votes
1 answer
930 views

How to pass an object type with python in a stored procedure as IN OUT parameter

i have a legacy datamodel with three schemas. data, view and api. The tables are stored in data, views in views and stored procs in api. Now i want to use django to build an app for it. In the api i ...
Andreas's user avatar
  • 11
-2 votes
1 answer
232 views

Call Postgresql procedure from Django

I am using Postgresql in Django and Python,and I do all the CRUD operation successfully but I don't know how can I call Postgresql procedure from Django and show the result in my web application!!
franchesco totti's user avatar

15 30 50 per page