It usually needs to do that as part of building a database snapshot. In the 1.9 releases, I think the only time it does that is if you are using precondions like tableExists or columnExists. The current codebase also uses it (though not a full database snapshot anymore) to check the state/existance of the databasechangelog table, but I don't think we did that in 1.9. If you aren't using preconditions, that is probably why it is doing it. The call itself is made because that is the only way we can determine if a column is autoincrement based on the jdbc metadata.
Unfortunately, I think the only way around the problem for now is to add a try/catch around the select id cal and assume it is not autoincrement if you don't have access to it. Do you have a stacktrace you could send? Nathan On Wed, Sep 2, 2009 at 12:13 PM, Maricel Quesada<[email protected]> wrote: > > Hi All, > > I am using Liquibase plug in for Grails and when I try to execute the > migration on an existing Postgresql database I am getting the following > exception: > > org.postgresql.util.PSQLException: ERROR: permission denied for relation > lock_details > > I am adding new tables, constraints, foreign keys, etc., but I am not > messing around with existing tables and for what I am seeing in the Postgres > log files, it seems that Liquibase goes through all the tables doing selects > like this: > > SELECT id FROM public.comments WHERE 1 = 0 > > but when it gets to lock_details, it breaks because this is a view that > belongs to the postgres user, which is not the one I am using, and my user > does not have access to this view. > > My biggest question here is why Liquibase needs to do this and how can I > prevent it from crashing when doing this kind of selects on table/views that > my user doesn't have access to? > > Any help is very much appreciated!! > > Thanks!! > -- > View this message in context: > http://www.nabble.com/Liquibase-migration-failing-due-to-permission-denied-for-relation-I-am-not-even-using-tp25261723p25261723.html > Sent from the LiquiBase - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Liquibase-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/liquibase-user > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Liquibase-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/liquibase-user
