Re: instr

From: Euler Taveira <euler(at)timbira(dot)com(dot)br>
To: aline(dot)sca(at)hotmail(dot)com
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: instr
Date: 2017-09-19 15:41:47
Message-ID: CAHE3wgh3JtELkgQ6S6NfXnYtUfqBFHJXWEaTqP_8zhCJ=eisyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

2017-09-13 10:46 GMT-03:00 <aline(dot)sca(at)hotmail(dot)com>:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.1/static/queries-with.html
> Description:
>
> Na documentação mostra uma migração do oracle para o postgresql no qual
> utliza a função nativa "instr". Na documentação mostra que esta função
> existe no postgresql, porem quando tento utilizar me retorna erro dizendo
> que nao existe.
>
Aline, esta lista utiliza inglês como língua principal.

Sobre a sua dúvida, a documentação [1] é bem clara quando diz que o
postgres *não* tem tal função mas que você pode criá-la se quiser (há
uma seção [2] com tal implementação em PL/pgSQL).

"Example 42.10 shows how to port a function with OUT parameters and
string manipulation. PostgreSQL does not have a built-in instr
function, but you can create one using a combination of other
functions. In Section 42.12.3 there is a PL/pgSQL implementation of
instr that you can use to make your porting easier."

[1] https://www.postgresql.org/docs/10/static/plpgsql-porting.html
[2] https://www.postgresql.org/docs/10/static/plpgsql-porting.html#plpgsql-porting-appendix

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

In response to

  • instr at 2017-09-13 13:46:44 from aline.sca

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2017-09-19 20:05:35 Re: Docbook 5.x
Previous Message randy 2017-09-19 03:03:11 How to prompt for a value if a variable is not set