Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

add table images

Jonathan Summers-Muir50955818069d
diff --git a/apps/www/_blog/2022-08-19-pg_jsonschema.mdx b/apps/www/_blog/2022-08-19-pg_jsonschema.mdx
index 1765e3e2154..65c09db2749 100644
--- a/apps/www/_blog/2022-08-19-pg_jsonschema.mdx
+++ b/apps/www/_blog/2022-08-19-pg_jsonschema.mdx
@@ -80,10 +80,13 @@ create table some_table (
insert into some_table (metadata)
values (<SQL Input>);
+
```
But the resulting schema is much more permissive than our intent. When inserting a mix of correct and incorrect values:
+![Table 1](/images/blog/lw5-pg_jsonschema/table-1.png)
+
| SQL input | Inserted | metadata column value (json) | note |
| ------------------------------- | -------- | ---------------------------- | ----------------------------------- |
| '{"foo": "bar"}' | Yes | {"foo": "bar"} | expected payload |
@@ -176,6 +179,8 @@ values
With that check constraint in place, we re-run the same test cases:
+![Table 2](/images/blog/lw5-pg_jsonschema/table-2.png)
+
| SQL input | Inserted | metadata column value | note |
| ------------------------------- | -------- | ---------------------- | ----------------------------------- |
| '{"foo": "bar"}' | Yes | {"foo": "bar"} | expected payload |
diff --git a/apps/www/public/images/blog/lw5-pg_jsonschema/table-1.png b/apps/www/public/images/blog/lw5-pg_jsonschema/table-1.png
new file mode 100644
index 00000000000..6daa7e6ce1d
Binary files /dev/null and b/apps/www/public/images/blog/lw5-pg_jsonschema/table-1.png differ
diff --git a/apps/www/public/images/blog/lw5-pg_jsonschema/table-2.png b/apps/www/public/images/blog/lw5-pg_jsonschema/table-2.png
new file mode 100644
index 00000000000..ae3c0425838
Binary files /dev/null and b/apps/www/public/images/blog/lw5-pg_jsonschema/table-2.png differ