Skip to content

Give clients only their rows in Postgres

You may keep every client's work in one Postgres database. Each row belongs to a client, a project or an account. You want that client to open their own rows. You do not want them to open another client's rows.

A shared database login does not solve that on its own. The login can read every row the role can select. A safer path is a filtered panel for each person.

OnlyDash can do that in an admin panel. You invite the client, hide the tables they should not open, and set one row filter for them.

Why a shared database is a poor client view

If you give a client a database user, they can connect with any SQL tool. They see whatever that role can select. You then have to maintain grants, and often a view, for each client.

A view per client is a standard Postgres pattern. You grant SELECT on the view, and not on the base table. That can work for a technical client. It does not give them a form, a filtered grid or a chart. OnlyDash also does not show views in the panel, so those views would not appear there.

Row-level security can enforce the same limit in the database. See Postgres row-level security for an admin panel. Use it when the client might also connect with other tools.

Prepare your tables in Postgres

Keep a stable client key on every row you plan to share. Use a client id, a company name or the client's email. The same value must appear on every row that belongs to them.

Avoid a label that changes spelling. A filter that uses "Acme" will not match "ACME Ltd".

Plan for private columns before you invite the client. For each person, you can hide a column or make it read-only, per table, from the Share panel. A hidden column does not show in that person's table, record details, charts, search, CSV export or row history.

How OnlyDash limits each client

Paste your connection string. OnlyDash reads the base tables and builds a grid, filters and forms for each one. Invite the client. Give them Viewer if they should only read, or Editor if they should change a row. A Custom rule can set each table to view, edit or hidden.

Set one row filter for that client, such as their company name, or their email. A row filter uses is, is one of, or contains. The value can be a fixed value or the member's own email.

OnlyDash applies the filter on the server. The client cannot turn it off in the grid. The filter applies to the table, charts, search, exports and edits. A Viewer cannot edit. An Editor can change or add rows only inside the filter. Export the rows you can see as a CSV file.

Edits go to your database, one row at a time. Activity history records writes made in the panel. It does not record edits the client, or you, make directly in the database.

Teammates do not get the connection string. After you save it, nobody sees the password, not even you.

Pick a person to see their view

Owner sees 17 of 17 rows

No row filter.

invoices, as Owner sees it
StatusAmountDue dateIssued datePaid date
Unpaid5,000.00Jul 1Jun 1
Paid7,500.00Aug 1Jul 1Jul 15
Paid24,000.00May 1Apr 1Apr 24
Paid31,500.00Jul 1Jun 1Jun 19
Paid42,000.00Jun 1May 1May 28
Paid18,500.00Apr 1Mar 1Mar 21
Paid12,750.00May 1Apr 1Apr 15
Paid9,800.00Jun 1May 1May 9
Unpaid27,300.00Sep 1Aug 1
Unpaid33,900.00Sep 1Aug 1
Unpaid15,600.00Aug 1Jul 1
Unpaid21,400.00Sep 1Aug 1
Overdue8,900.00Jun 1May 1
Overdue46,200.00Jul 1Jun 1
Overdue5,400.00May 1Apr 1
Draft19,750.00Oct 1Aug 1
Draft6,300.00Oct 1Aug 1

Swipe to see more.

Sample rows from the invoices table in the Sample project database, the guest demo on OnlyDash. The demo shows what each person gets after you invite them.

Connect your Postgres database

Paste a connection string, or try the demo with no sign-up. OnlyDash is in beta.

Try the demo, no sign-upConnect your database

Set up a client view

  1. Add a stable client key to each table you will share.
  2. Paste the connection string into the Postgres admin panel.
  3. Invite the client, hide the internal tables, and set one row filter on the shared tables.

Before you invite the client, check a list, a chart and an export, not only the first page of the grid.

For the invite model, see Share Postgres data without sharing credentials.

Questions

Can a client see another client's rows in the panel?

No, if you set a row filter that matches only their rows, and you hide the tables that have no filter. The filter applies to the table, charts, search, exports and edits. A Viewer cannot edit. An Editor can change or add rows only inside the filter.

Can I use the client's email as the filter?

Yes. A row filter can use the member's own email. The filter ignores letter case and extra spaces.

Can I hide one column from a client?

Yes. For each person, you can hide a column or make it read-only, per table, from the Share panel. A hidden column does not show in that person's table, record details, charts, search, CSV export or row history.

Do client edits go into the activity history?

OnlyDash records writes made in the panel, with the person, the table, the row, and the old and new values. Edits made directly in the database are not recorded.

Connect your Postgres database

Paste a connection string, or try the demo with no sign-up. OnlyDash is in beta.

Try the demo, no sign-upConnect your database

For a product overview, see the Postgres admin panel.