Skip to content

feat(console): function and trigger dialogs (point 12.3, first part) - #223

Merged
SauravYadav12 merged 2 commits into
mainfrom
feat/p12-routines
Nov 10, 2026
Merged

SauravYadav12 merged 2 commits into
mainfrom
feat/p12-routines

Conversation

@SauravYadav12

Copy link
Copy Markdown
Collaborator

First part of point 12.3 (pgAdmin's basics): create and edit dialogs for functions, procedures, trigger functions and triggers. Table dialogs follow in a separate PR.

What it adds

  • + New function… in the Console's schema rail makes a function, a procedure or a trigger function.
  • Edit… changes the body, language, volatility, strict and security definer. It keeps what the dialog has no field for: LEAKPROOF, PARALLEL, COST, ROWS and each SET clause.
  • Rename… and Drop… use the identity arguments.
  • A table's Triggers tab gets + New trigger…, Edit, Rename and Drop. An edit keeps REFERENCING, and a disabled trigger stays disabled.
  • Each dialog shows the SQL as it is built and runs it as the person, so their rights, the guardrails and the Blackbox apply. What a guardrail refuses can be put in the editor.
  • FoxByte's own functions and triggers are not offered.
  • The engine gives routine and trigger details on GET …/schema/{kind}/{oid} and marks trigger functions in the list. fox schema output is unchanged.

Fixed on the way

A slow reply about the branch just left could replace the Console's catalog of the branch switched to, and a table then said it was not in the catalog. Each load now ignores replies to an earlier one. routines.spec.ts covers it by delaying the reply.

Worth knowing

  • The Blackbox records a dropped procedure or trigger at its next catalog scan, as OBSERVED with the actor unknown. That is the existing design, and the docs now say so.
  • Ordinary accounts share one database role (db_client), so one account can change a function another account made. This already held in the SQL editor and the dialogs do not widen it.

Tests

On this branch, rebased on main after #222:

  • integration 916/916 (§11ap new)
  • UI 59/59 plus the upgrade test (routines.spec.ts new)
  • web unit 280/280
  • Go unit tests in both editions, vet for macOS, Linux and Windows

Before the rebase, on the same feature code:

  • v2 403/403, f5 57/57, f1 70/70, f6 71/71

New, Edit, Rename and Drop for functions, procedures, trigger functions and
triggers. Each dialog shows the SQL as it is built and runs it as the person.
An edit keeps what it has no field for. The catalog gives each function's
attributes and each trigger's parts, and marks trigger functions in the list.

Also: a late reply about the branch just left no longer replaces the
console's catalog of the branch switched to.
@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
foxbyte-get Ready Ready Preview Nov 10, 2026 4:38pm UTC

@SauravYadav12
SauravYadav12 merged commit a508614 into main Nov 10, 2026
8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant