Re: postgres index rebuild

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: jashobanta(dot)mahapatra(at)mahindracomviva(dot)com
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: postgres index rebuild
Date: 2017-05-26 19:24:33
Message-ID: CAHE3wgiUSijFbCajxEo9+dhXakAaZZXxJWW1DBoUHUijQ8jSJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

2017-05-25 9:38 GMT-03:00 <jashobanta(dot)mahapatra(at)mahindracomviva(dot)com>:

>
> I was trying to keep all the queries(create, drop, alter) in a function.
> And
> &#39;ll call the function when required.
> But i got below error
> &quot;CREATE INDEX CONCURRENTLY cannot be executed from a function or
> multi-command string&quot;

CIC can't be executed inside a transaction block or a user-defined function
because it involves some phases that are not easily rollback-able. Instead
create a small script with those commands.

--
Euler Taveira Timbira -
http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
<http://www.timbira.com.br>

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Michael Paquier 2017-05-26 20:14:11 Re: postgres index rebuild
Previous Message Magnus Hagander 2017-05-26 15:03:19 Re: envvar PGREALM seems no longer used