fix: remove trigger, origin and redundant type properties from notification payload

This commit is contained in:
2026-06-11 12:19:25 -04:00
parent 1dfd53e53c
commit 03c60f5156
5 changed files with 1 additions and 76 deletions

View File

@ -151,41 +151,4 @@ impl DatabaseExecutor for SpiExecutor {
})
}
fn auth_origin(&self) -> Result<Option<Value>, String> {
Spi::connect(|client| {
let mut tup_table = client
.select(
"SELECT NULLIF(current_setting('auth.origin', true), '')::jsonb",
None,
&[],
)
.map_err(|e| format!("SPI Select Error: {}", e))?;
if let Some(row) = tup_table.next() {
if let Ok(Some(jsonb)) = row.get::<pgrx::JsonB>(1) {
return Ok(Some(jsonb.0));
}
}
Ok(None)
})
}
fn punc_trigger(&self) -> Result<Option<String>, String> {
Spi::connect(|client| {
let mut tup_table = client
.select(
"SELECT NULLIF(current_setting('punc.name', true), '')",
None,
&[],
)
.map_err(|e| format!("SPI Select Error: {}", e))?;
if let Some(row) = tup_table.next() {
if let Ok(val_opt) = row.get::<String>(1) {
return Ok(val_opt);
}
}
Ok(None)
})
}
}