# How Alter postgres table definitions with ansible?

**URL:** <https://forum.ansible.com/t/how-alter-postgres-table-definitions-with-ansible/31185>\
**Category:** Ansible Project\
**Created:** [August 31, 2019, 5:56pm UTC](https://forum.ansible.com/t/how-alter-postgres-table-definitions-with-ansible/31185 "2019-08-31T17:56:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simon\_read](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@simon\_read](https://forum.ansible.com/u/simon_read)\
**Post date:** [August 31, 2019, 5:56pm UTC](https://forum.ansible.com/t/how-alter-postgres-table-definitions-with-ansible/31185/1 "2019-08-31T17:56:48Z")

</div>

We are using ansible to deploy postgres/schema/tables.  
We require to patch the tables and therefore require to alter the tables (e.g. add or change type of columns).  
There seems to be two modules related to this. postgresql\_table (can create tables but not alter) and  
postgres\_query (seems to be for DML statements).

Can you advise? I am new too ansible and wonder why altering tables is not currently included with a module?

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [September 4, 2019, 3:34pm UTC](https://forum.ansible.com/t/how-alter-postgres-table-definitions-with-ansible/31185/2 "2019-09-04T15:34:50Z")

</div>

The person(s) that created the module didn't have the need for the functionality and did not implement it.

Anyone can add the functionality if that want to, or hire someone to do it for them.
