Skip to content

How to use listen with PostgreSQL on_conflict_do? #11387

Discussion options

You must be logged in to vote

Hi,

The is_update flag refers to an update statement. All insert statements, regardless of on_conflict qualification are identified as inserts.

At the moment I don't think there are public accessors to get what value was used, but you can take a look at the source and likely use _post_values_clause. https://github.com/sqlalchemy/sqlalchemy/blob/main/lib/sqlalchemy/dialects/postgresql/dml.py

@zzzeek are there better options?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@zzzeek
Comment options

@Rett-oo
Comment options

Answer selected by Rett-oo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants