Thanks ! It helped :) On Wednesday, December 4, 2019 at 1:31:31 PM UTC+1, Simon King wrote: > > On Wed, Dec 4, 2019 at 12:13 PM Jordan Pittier <[email protected] > <javascript:>> wrote: > > > > Hi, > > I am looking for a way to describe, in my Python model, that a table > should have autovacuum_vacuum_scale_factor and > autovacuum_analyze_scale_factor set to a non-default value. Similar to what > the following statement would do: > > > > ALTER TABLE public.XX SET (autovacuum_vacuum_scale_factor = 0.1); > > ALTER TABLE public.YY SET (autovacuum_analyze_scale_factor = 0.05); > > > > Any chance you would know how to do that ? > > Thanks > > Jordan > > I don't think there's any built-in support for that, but you could > certainly do it by listening for the "after_create" table event. See > the first example at: > > > https://docs.sqlalchemy.org/en/13/core/events.html#sqlalchemy.events.DDLEvents > > > Hope that helps, > > Simon >
-- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/3a9ab63a-f226-4e8b-9b2a-69317702331c%40googlegroups.com.
