> For the complete documentation index, see [llms.txt](https://docs.unskript.com/unskript-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unskript.com/unskript-documentation/connnecting/connectors/postgres/action_postgresql.md).

# Postgres Actions

* [Call PostgreSQL Stored Procedure](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_stored_procedures/README.md) : Call PostgreSQL Stored Procedure
* [Calling a PostgreSQL function](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_call_function/README.md) : Calling a PostgreSQL function
* [Create Tables in PostgreSQL](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_create_table/README.md) : Create Tables PostgreSQL
* [Delete PostgreSQL Query](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_delete_query/README.md) : Delete PostgreSQL Query
* [Execute commands in a PostgreSQL transaction.](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_handling_transaction/README.md) : Given a set of PostgreSQL commands, this actions run them inside a transaction.
* [Get PostgreSQL Handle](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_get_handle/README.md) : Get PostgreSQL Handle
* [Long Running PostgreSQL Queries](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_long_running_queries/README.md) : Long Running PostgreSQL Queries
* [PostgreSQL Calculate Bloat](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgres_calculate_bloat/README.md) : This Lego calculates bloat for tables in Postgres
* [PostgreSQL Check Unused Indexes](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_check_unused_indexes/README.md) : Find unused Indexes in a database in PostgreSQL
* [PostgreSQL Get Cache Hit Ratio](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_get_cache_hit_ratio/README.md) : The result of the action will show the total number of blocks read from disk, the total number of blocks found in the buffer cache, and the cache hit ratio as a percentage. For example, if the cache hit ratio is 99%, it means that 99% of all data requests were served from the buffer cache, and only 1% required reading data from disk.
* [PostgreSQL Get Index Usage](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_get_index_usage/README.md) : The action result shows the data for table name, the percentage of times an index was used for that table, and the number of live rows in the table.
* [PostgreSQL check active connections](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_check_active_connections/README.md) : Checks if the percentage of active connections to the database exceeds the provided threshold.
* [PostgreSQL check for locks in database](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgres_check_locks/README.md) : Checks for any locks in the postgres database.
* [PostgreSQL get service status](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_get_server_status/README.md) : This action checks the status of each database.
* [Read PostgreSQL Query](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_read_query/README.md) : Read PostgreSQL Query
* [Show tables in PostgreSQL Database](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_show_tables/README.md) : Show the tables existing in a PostgreSQL Database. We execute the following query to fetch this information SELECT \* FROM pg\_catalog.pg\_tables WHERE schemaname != 'pg\_catalog' AND schemaname != 'information\_schema';
* [Write PostgreSQL Query](https://github.com/unskript/Awesome-CloudOps-Automation/Postgresql/legos/postgresql_write_query/README.md) : Write PostgreSQL Query


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.unskript.com/unskript-documentation/connnecting/connectors/postgres/action_postgresql.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
