Skip to content

Commit

Permalink
Update pg_net.mdx | fixed typo in code, improved language (#30719)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOtherBrian1 authored Nov 28, 2024
1 parent 2f0d188 commit d934bc9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/docs/content/guides/database/extensions/pg_net.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,11 @@ begin
) as request_id;

-- Optionally Log row data or other data for inspection in Supabase Dashboard's Postgres Logs
-- (https://supabase.com/dashboard/project/_/logs/postgres-logs)
raise log 'Logging an entire row as JSON (%)', row_data_var;

-- return the row data to inspect
-- return row data to inspect
return row_data_var;

-- Handle exceptions here if needed
exception
when others then
Expand Down Expand Up @@ -315,7 +315,7 @@ Supabase supports reconfiguring pg_net starting from v0.12.0+. For the latest re

</Admonition>

The extension is configured to execute up to 200 requests per second reliably. The response messages are stored for only 6 hours to prevent needless buildup. The default behavior can be modified by rewriting config variables.
The extension is configured to reliably execute up to 200 requests per second. The response messages are stored for only 6 hours to prevent needless buildup. The default behavior can be modified by rewriting config variables.

### Get current settings

Expand All @@ -332,7 +332,7 @@ where "name" like 'pg_net%';
Change variables:

```sql
alter role "postgres" set pg_net.ttl to '24 hour';
alter role "postgres" set pg_net.ttl to '24 hours';
alter role "postgres" set pg_net.batch_size to 500;
```

Expand Down Expand Up @@ -416,7 +416,7 @@ with "selected_table_rows" as (
-- Converts all the rows into a JSONB array
jsonb_agg(to_jsonb(<table_name>.*)) as JSON_payload
from <table_name>
-- Generally good practice to LIMIT the max amount of rows
-- good practice to LIMIT the max amount of rows
)
select
net.http_post(
Expand All @@ -426,7 +426,7 @@ select
FROM "selected_table_rows";
```

More examples can be seen in the [Extension's GitHub page](https://github.com/supabase/pg_net/)
More examples can be seen on the [Extension's GitHub page](https://github.com/supabase/pg_net/)

## Limitations

Expand All @@ -435,7 +435,7 @@ More examples can be seen in the [Extension's GitHub page](https://github.com/su
- Can only make POST requests with JSON data. No other data formats are supported
- Intended to handle at most 200 requests per second. Increasing the rate can introduce instability
- Does not have support for PATCH/PUT requests
- Can only work with one database at a time in PostgreSQL. It defaults to the postgres database.
- Can only work with one database at a time. It defaults to the postgres database.

## Resources

Expand Down

0 comments on commit d934bc9

Please sign in to comment.