Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pg_net.mdx | fixed typo in code, improved language #30719

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -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
@@ -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

@@ -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;
```

@@ -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(
@@ -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

@@ -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