Skip to content

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

reformatting of extension guides

Mark Burggrafaf8517cf8f6d
diff --git a/web/docs/guides/database/extensions/http.mdx b/web/docs/guides/database/extensions/http.mdx
index 90ff5d19199..bf454a730c7 100644
--- a/web/docs/guides/database/extensions/http.mdx
+++ b/web/docs/guides/database/extensions/http.mdx
@@ -62,7 +62,7 @@ To disable an extension you can call `drop extension`.
</Tabs>
-### `HTTP` functions
+## `HTTP` functions
While the main `HTTP` function is simply `http(http_request)`, there are 5 wrapper functions for specific functionality:
@@ -72,8 +72,9 @@ While the main `HTTP` function is simply `http(http_request)`, there are 5 wrapp
- `http_delete()`
- `http_head()`
-### Using the `HTTP` extension
+## Examples
+### `HTTP GET`
Get a bunch of information about the current time (in JSON format):
```sql
@@ -92,6 +93,8 @@ Get information on a food product:
SELECT content::json as product FROM http_get('https://world.openfoodfacts.org/api/v0/product/9300650018860.json');
```
+### `HTTP POST`
+
Post data to an API endpoint:
```sql
diff --git a/web/docs/guides/database/extensions/plv8.mdx b/web/docs/guides/database/extensions/plv8.mdx
index 50011b8fdcf..afff10d5c34 100644
--- a/web/docs/guides/database/extensions/plv8.mdx
+++ b/web/docs/guides/database/extensions/plv8.mdx
@@ -64,8 +64,24 @@ To disable an extension you can call `drop extension`.
</Tabs>
+## Creating `PLV8` functions
-### Creating a `PLV8` function
+Functions written in `PLV8` (Javascript V8) are written just like any other PostgreSQL functions, only
+with the `LANGUAGE` identifier set to `plv8`.
+
+```sql
+CREATE OR REPLACE FUNCTION function_name(parameter1 text, parameter2 integer) RETURNS TEXT AS $$
+ // V8 Javascript
+ // code
+ // here
+ return 'return value';
+$$ LANGUAGE plv8;
+```
+
+
+## Examples
+
+### Scalar Functions
A simple Scalar Function.
diff --git a/web/docs/guides/database/extensions/uuid-ossp.mdx b/web/docs/guides/database/extensions/uuid-ossp.mdx
index 63dab3bb88a..e9153260100 100644
--- a/web/docs/guides/database/extensions/uuid-ossp.mdx
+++ b/web/docs/guides/database/extensions/uuid-ossp.mdx
@@ -61,7 +61,7 @@ To disable an extension you can call `drop extension`.
</Tabs>
-### `UUID` functions
+## `UUID` functions
To generate the UUID values based on the combination of computer’s MAC address, current timestamp, and a random value, you use the uuid_generate_v1() function:
@@ -72,7 +72,7 @@ To generate a UUID value solely based on random numbers, use the uuid_generate_v
```uuid_generate_v4()```
-### `UUID` Usage
+## Examples
Basic usage in a select statement: