Re: Executing stored procs
От | Daniele Varrazzo |
---|---|
Тема | Re: Executing stored procs |
Дата | |
Msg-id | CA+mi_8ZhBBvo7pn4_EzJ2joBRXxYhygABz2RQ9AK7Vg0Wkd7eQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Executing stored procs (Anthony Waye <anthony.waye@arq.group>) |
Ответы |
RE: Executing stored procs
|
Список | psycopg |
Essentially results in a SQL query of: CALL "stg_customervip"."sp_stg_customer"(37::bigint, '2020-01-15 05:52:31'::timestamp)
If I take that query and run it directly in redshift it runs successfully but via psycopg2 it returns:
psycopg2.errors.FeatureNotSupported: TRUNCATE cannot be invoked from a procedure that is executing in an atomic context.
HINT: Try calling the procedure as a top-level call i.e. not from within an explicit transaction block. Or, if this procedure (or one of its ancestors in the call chain) was created with SET config options, recreate the procedure without them.
CONTEXT: SQL statement "TRUNCATE table stg_customervip.Customer"
While that error sounds legitimate I think it might be a redherring because it does execute successfully if I do it manually against redshift.
Вложения
В списке psycopg по дате отправления: