+ trigger=pgtrigger.compiler.Trigger(name='pgpubsub_8c7ef', sql=pgtrigger.compiler.UpsertTriggerSql(declare='DECLARE payload JSONB; notification_context_text TEXT;', func='\n \n payload := \'{"app": "shared", "model": "CVEDerivationClusterProposal"}\'::jsonb;\n payload := jsonb_insert(payload, \'{old}\', COALESCE(to_jsonb(OLD), \'null\'));\n payload := jsonb_insert(payload, \'{new}\', COALESCE(to_jsonb(NEW), \'null\'));\n SELECT current_setting(\'pgpubsub.notification_context\', True) INTO notification_context_text;\n IF COALESCE(notification_context_text, \'\') = \'\' THEN\n notification_context_text := \'{}\';\n END IF;\n payload := jsonb_insert(payload, \'{context}\', notification_context_text::jsonb);\n \n \n INSERT INTO pgpubsub_notification (channel, payload)\n VALUES (\'pgpubsub_8c7ef\', payload);\n \n perform pg_notify(\'pgpubsub_8c7ef\', payload::text);\n RETURN NEW;\n ', hash='f992274d71c90db51227a6220854697b1f77b60e', operation='INSERT', pgid='pgtrigger_pgpubsub_8c7ef_29d5d', table='shared_cvederivationclusterproposal', when='AFTER')),
0 commit comments