# best practice for dealing functions/stored procedures on an existing database

**URL:** <https://forum.liquibase.org/t/best-practice-for-dealing-functions-stored-procedures-on-an-existing-database/2401>\
**Category:** General Discussion\
**Created:** [September 1, 2013, 2:08am UTC](https://forum.liquibase.org/t/best-practice-for-dealing-functions-stored-procedures-on-an-existing-database/2401 "2013-09-01T02:08:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vitaliy](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@Vitaliy](https://forum.liquibase.org/u/Vitaliy)\
**Post date:** [September 1, 2013, 2:08am UTC](https://forum.liquibase.org/t/best-practice-for-dealing-functions-stored-procedures-on-an-existing-database/2401/1 "2013-09-01T02:08:00Z")

</div>

Greetings,

I would like to hear your opinion on dealing with functions/stored procedures with Liquibase on an existing database.

I have a postgresql database with a lot of functions for different schemas.

So far i think to use pg\_dump of whole db as my initial change log, apply it to database and using the recently introduced sql format. All I need to do is to add one comment with liquibase metadata &nbsp;to the pg dump text file.

Are there any pitfalls?

Has someone faced similar problem?

Best Regards

Vitaliy

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [September 1, 2013, 2:08am UTC](https://forum.liquibase.org/t/best-practice-for-dealing-functions-stored-procedures-on-an-existing-database/2401/2 "2013-09-01T02:08:00Z")

</div>

That is probably the best approach if you have a lot of stored procedures since Liquibase does not try to snapshot them with the generateChangeLog functionality.

By add one one comment" you mean adding the --liquibase formatted sql comment? You can do that, but you can also leave it off and liquibase will also run it as one big changeset.

Nathan
