Remarks not generated for Postgres

Hi,

I have a Liquibase change set that contains remarks for tables and columns. When I run updateSQL with this changeSet against an Oracle database, Liquibase correctly generates the “COMMENT ON …” statements to apply the remarks.
However for Postgres the COMMENT ON is not generated.

Btw: it would be nice if the remarks attribute would be added to all tags where it makes sense (e.g. createIndex, addForeignKey, addPrimaryKey) to be able to maintain that information when using databases that can add comments to any object (such as Postgres or DB2)

I’m using Liquibase 1.9.5. Is this Postgres related bug perhaps fixed in 2.0 ?

It hasn’t been scheduled for 2.0 yet.  The trouble is that we need to find and add the adding comments sql syntax for all database types and we have not yet done that for postgres. 

If you are interested in getting it in sooner, you could take a look at the code in trunk and commit a patch.

Nathan

Originally posted by: Nathan
It hasn't been scheduled for 2.0 yet.  The trouble is that we need to find and add the adding comments sql syntax for all database types and we have not yet done that for postgres. 
Thanks for the feedback.

It’s actually quite easy because all databases that do support remarks (Oracle, Postgres, DB2, Derby, H2 and MySQL in a limited way) do use the ANSI syntax. So you can simply use the code that you already have for Oracle for the other databases…

I created http://liquibase.jira.com/browse/CORE-480 to track the issue.

Nathan

I’m looking forward to this in a big way.

I am scheduling it for 2.1 so that I can get 2.0 out.  If you are interested/able you can certainly look at the code and see if you can get it implemented sooner.

Nathan

I would like to help pushing this feature by supplying the needed information.

The syntax is one of the few statements that is the same for all DBMS that do support the COMMENT statement. Only SQL Server and MySQL implement this in a completely non-standard way (why am I not surprised…)

The syntax for those standard compliant DBMS is:

ALTER TABLE statements if I’m not mistaken.

Hope this helps.