python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to run PostgreSQL query which starts with "DO $$ " in Python
I have PostgreSQL query which starts with DO:
do
$$
DECLARE
temprow record;
BEGIN
for temprow in
select *
from generate_series(1, 100)
where generate_series % 2 = 0
...
S.Honcharov
Votes: 0
Answers: 1
How do I automate multiple CSV exports with FOR loop in PostgreSQL?
I'm trying to export a series of csv files by symbol
CREATE OR REPLACE FUNCTION exportcrypto()
RETURNS void AS
$func$
declare
irec record;
BEGIN
FOR irec IN
SELECT DISTINCT symbol FROM dai...
user3190635
Votes: 0
Answers: 1
How to access a postgresql defined variable from Python
I have a python3 code, where I'm inserting data into a postgres table, where the table has a SERIAL integer column, whose value I would like to return after insert.
I have tried using 'Returning', but...
Hari Shreyas
Votes: 0
Answers: 1
Stored procedure to batch update a table in postgresql
I am running an Extract Transform Load job, triggered every minute, that inserts or updates a few rows (1k) in a table T. Table T has 4.5 million rows.
A second Job needs to update a field with a stor...
Angelo Canesso
Votes: 0
Answers: 0