Re: Consulta sobre funciones en la version 8.3.1

From: "Diego Ayala" <netdiego81(at)gmail(dot)com>
To: "Jaime Casanova" <systemguards(at)gmail(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Consulta sobre funciones en la version 8.3.1
Date: 2008-04-02 11:37:54
Message-ID: 6b81cb150804020437m48fec326lad768cacabcef6e5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Vaya, creo q me pase darle una leida a esa parte.. :-( , muchas gracias x su
ayuda..!!

2008/4/2, Jaime Casanova <systemguards(at)gmail(dot)com>:
>
> 2008/3/31 Diego Ayala <netdiego81(at)gmail(dot)com>:
>
> >
> > select substr(current_date,1,4)
> >
> > ERROR: no existe la función substr(date, integer, integer)
> > LINE 1: select substr(current_date,1,4)
> > ^
> > HINT: Ninguna función coincide en el nombre y tipos de argumentos.
> Puede
> > desear agregar conversión explícita de tipos.
> >
> > Entiendo que no se puede realizar un substr de current_date, ya que
> > casteando si ejecuta la sentencia
> >
> > select substr(current_date::text,1,4)
> >
> > 2008
> >
> > sin embargo en la version 8.2.3 al ejecutar esta misma sentencia lo hace
> sin
> > necesidad de realizar el cast.
> >
>
>
> asi es, eso cambio en 8.3
>
> http://www.postgresql.org/docs/current/static/release-8-3.html
> """
> Non-character data types are no longer automatically cast to TEXT (Peter,
> Tom)
>
> Previously, if a non-character value was supplied to an operator or
> function that requires text input, it was automatically cast to text,
> for most (though not all) built-in data types. This no longer happens:
> an explicit cast to text is now required for all non-character-string
> types. For example, these expressions formerly worked:
>
>
> substr(current_date, 1, 4)
>
> 23 LIKE '2%'but will now draw "function does not exist" and "operator
> does not exist" errors respectively. Use an explicit cast instead:
>
>
> substr(current_date::text, 1, 4)
>
> 23::text LIKE '2%'
>
> """
>
> >
> > la consulta que tengo es, en esta nueva versión 8.3.1, ya valida que no
> se
> > realice un substr de current_date, ??
>
>
> no, lo que hace es NO realizar un cast implicito a text
>
>
> > conocen algunas otras funciones que
> > cambian respecto a su funcionamiento ? con versiones anteriores del
> > PostgreSQL 8.3.1
> >
>
>
> date leida de esto
> http://www.postgresql.org/docs/current/static/release-8-3.html
>
> --
> Atentamente,
>
> Jaime Casanova
>

--
Diego Ayala

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Rodriguez Fernando 2008-04-02 13:08:41 Re: Framework de persistencia
Previous Message Julio Cesar Sánchez González 2008-04-02 07:50:31 Re: postgres como cliente