Object Editor
Object Editor is a UI form for creating and editing database objects (tables, views, functions, indexes, types). An alternative to handwriting CREATE TABLE with form validation and DDL preview.
Open
- In Schema Browser: right-click a node → Edit… or + New.
- From the palette: ⌘+K →
Create table, Create view, etc.
Creating a table
Form with sections:
Basics
- Schema — where to create (default
public)
- Name — table name (validated: latin letters, digits,
_; no reserved words)
- Comment — optional description (saved via
COMMENT ON TABLE)
Columns
A column table with + Add column. Per column:
- Name
- Type — searchable dropdown (all standard Postgres types + custom from current schema)
- Length / Precision — for
varchar(N), numeric(p,s)
- Nullable — checkbox (default yes)
- Default — value or expression (
now(), gen_random_uuid())
- Identity —
GENERATED ALWAYS AS IDENTITY for PK
- Generated —
GENERATED ALWAYS AS (expr) STORED for computed columns
- Comment
Constraints
- Primary Key — pick one or more columns
- Unique — add unique constraints
- Foreign Keys — multi-form with the referenced table picker and
ON DELETE / ON UPDATE (NO ACTION, CASCADE, SET NULL, SET DEFAULT, RESTRICT)
- Check — SQL expression to validate
Indexes
- + Add index: name, kind (
btree, hash, gin, gist, brin), columns, WHERE clause, INCLUDE columns
DDL preview
At the bottom of the form — Preview SQL in a collapsed block. Expand to see assembled SQL:
CREATE TABLE public.orders (
id BIGSERIAL PRIMARY KEY,
customer_id BIGINT NOT NULL REFERENCES customers(id) ON DELETE CASCADE,
status TEXT NOT NULL DEFAULT 'pending',
amount_cents BIGINT NOT NULL CHECK (amount_cents >= 0),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX idx_orders_customer_id ON public.orders(customer_id);
CREATE INDEX idx_orders_status ON public.orders(status) WHERE status != 'archived';
COMMENT ON TABLE public.orders IS 'Customer orders';
The Apply button executes a transaction. Cancel closes without running.
Creating a view
- Name + Schema
- Definition —
SELECT query (with autocomplete and highlighting)
- Materialized — checkbox. If yes —
CREATE MATERIALIZED VIEW, plus a Refresh policy option (manual / scheduled).
- With CHECK OPTION — for updatable views
Creating a function / procedure
- Name, Schema, Returns — return type (
integer, void, setof orders, etc.)
- Language —
plpgsql, sql, plv8 (if installed)
- Volatility —
IMMUTABLE, STABLE, VOLATILE
- Security —
INVOKER (default) or DEFINER
- Body — SQL editor with highlighting
Editing an existing object
Same form, fields prefilled. ide99 shows a diff between the current and the new DDL — so you can see exactly what changes. On prod — confirmation by typing the object name.
Drop with dependencies
When trying to drop a table referenced by FKs or used by views, ide99 shows:
Dropping orders will affect 2 objects:
- View
v_revenue uses column orders.amount_cents
- Foreign key
order_items.order_id_fkey references orders.id
[ Cancel ] [ Drop CASCADE ]
CASCADE is usually dangerous, but sometimes needed. ide99 shows the full list of what falls together.
Next