From: | Chris Angelico <rosuav(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: what's difference between vacuum analyze and analyze? |
Date: | 2012-03-28 15:29:46 |
Message-ID: | CAPTjJmq_0LDEu1ZiD9jt5PQ6mvGzz8BpBWZ0JzCAfVLwmj4PZg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Mar 29, 2012 at 2:24 AM, leaf_yxj <leaf_yxj(at)163(dot)com> wrote:
> I was asked to write a security definer function to make other user can issue
> vacuum and analyze command? Friends in this community said vacuum doesn't
> work inside the function or multi command. How about analyze. I know vacuum
> is something much like oracle shrink which is used to reorganize the space
> in the disk. Analyze is used to collect the statistic info of the table.
> Does analyze works in Function or mulit-commands?
There's an easy way to find out. Try it, and see if you get an error back!
http://www.catb.org/~esr/faqs/smart-questions.html
You may find that it isn't possible. If so, you may want to consider a
non-SQL solution; for instance, a shell script that invokes
vacuum/analyze.
Chris Angelico
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-03-28 15:30:14 | Re: oracle linux |
Previous Message | leaf_yxj | 2012-03-28 15:24:18 | what's difference between vacuum analyze and analyze? |