Обсуждение: instr detail

Поиск
Список
Период
Сортировка

instr detail

От
Ramesh T
Дата:
Hi All,
           is instr available in postgres 9.3..?

in oracle instr('12.32.42','.',-1) ,any help appreciated

Re: instr detail

От
Devrim GÜNDÜZ
Дата:
Hi,

On Wed, 2015-07-29 at 22:03 +0530, Ramesh T wrote:
>
>            is instr available in postgres 9.3..?
>
> in oracle instr('12.32.42','.',-1) ,any help appreciated

Orafce extension includes instr function:

https://github.com/orafce/orafce

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR




Re: instr detail

От
Karsten Hilbert
Дата:
On Wed, Jul 29, 2015 at 10:03:56PM +0530, Ramesh T wrote:

> Hi All,
>            is instr available in postgres 9.3..?
>
> in oracle instr('12.32.42','.',-1) ,
>
> any ...

    http://www.postgresql.org/docs/9.3/static/index.html

> ... help appreciated

You are welcome !

Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


Re: instr detail

От
Igor Neyman
Дата:

 

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ramesh T
Sent: Wednesday, July 29, 2015 12:34 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] instr detail

 

Hi All,

           is instr available in postgres 9.3..?

 

in oracle instr('12.32.42','.',-1) ,any help appreciated

 

__

 

There are lots of string functions and operators:

 

http://www.postgresql.org/docs/9.3/static/functions-string.html

 

There is definitely a replacement for Oracle’s instr(…).

 

Regards,

Igor Neyman

 

Re: instr detail

От
Melvin Davidson
Дата:
Based om the definition of Oracle instr(), the equivalent PostgreSQL function would be
position(substring in string).

On Wed, Jul 29, 2015 at 3:11 PM, Igor Neyman <ineyman@perceptron.com> wrote:

 

 

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Ramesh T
Sent: Wednesday, July 29, 2015 12:34 PM
To: pgsql-general@postgresql.org
Subject: [GENERAL] instr detail

 

Hi All,

           is instr available in postgres 9.3..?

 

in oracle instr('12.32.42','.',-1) ,any help appreciated

 

__

 

There are lots of string functions and operators:

 

http://www.postgresql.org/docs/9.3/static/functions-string.html

 

There is definitely a replacement for Oracle’s instr(…).

 

Regards,

Igor Neyman

 




--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Re: instr detail

От
Tom Lane
Дата:
Melvin Davidson <melvin6925@gmail.com> writes:
> Based om the definition of Oracle instr(), the equivalent PostgreSQL
> function would be
> position(substring in string).

See http://www.postgresql.org/docs/9.4/static/plpgsql-porting.html
particularly the "appendix" at the bottom.  I'm not sure that code
is still the best way to do it (it's very old), but it's there.

            regards, tom lane


Re: instr detail

От
Ramesh T
Дата:
select position('.' in '.T.homas')
result
--------
1
it returns first postion.but I need last occurence of ' . ' .
actual result 
------
3
any help..?appreciated.


On Thu, Jul 30, 2015 at 5:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Melvin Davidson <melvin6925@gmail.com> writes:
> Based om the definition of Oracle instr(), the equivalent PostgreSQL
> function would be
> position(substring in string).

See http://www.postgresql.org/docs/9.4/static/plpgsql-porting.html
particularly the "appendix" at the bottom.  I'm not sure that code
is still the best way to do it (it's very old), but it's there.

                        regards, tom lane

Re: instr detail

От
Ramesh T
Дата:

On Thu, Jul 30, 2015 at 7:38 PM, Ramesh T <rameshparnanditech@gmail.com> wrote:
select position('.' in '.T.homas')
result
--------
1
it returns first postion.but I need last occurence of ' . ' .
actual result 
------
3
any help..?appreciated.


On Thu, Jul 30, 2015 at 5:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Melvin Davidson <melvin6925@gmail.com> writes:
> Based om the definition of Oracle instr(), the equivalent PostgreSQL
> function would be
> position(substring in string).

See http://www.postgresql.org/docs/9.4/static/plpgsql-porting.html
particularly the "appendix" at the bottom.  I'm not sure that code
is still the best way to do it (it's very old), but it's there.

                        regards, tom lane