Re: Bug

From: Thiago Braga Nobre <thiagobraganobre(at)gmail(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Bug
Date: 2012-01-04 00:40:18
Message-ID: CAH3KbcVHwC1QSkWarDEviWDPqSnQ5N4B5rUXRiia5LXTBAwNDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

A practical example is the scheme substring (text, integer, integer), if I
step substring (row ['name'], start, end) but for some reason they start
and end string causes an exception, thesubstring function should not perform
the conversion from string to integer?

thanks a lot

2012/1/3 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>

> But if one is a numeric and one is a text, which do you convert?
> There's lots of conversations on this in the lists from about 4 or 5
> years ago. Since converting one way or the other can cause two
> different outputs, you can't be sure which is the right way. If you
> need a field cast, you now have to cast it yourself for safety.
>
> On Tue, Jan 3, 2012 at 4:56 PM, Thiago Braga Nobre
> <thiagobraganobre(at)gmail(dot)com> wrote:
> > what is the typing table field? If the type is numeric you convert
> > to number, if the type is varchar to string, it is very obvious, is not
> it?
> >
> >
> > 2012/1/3 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> >>
> >> No it was broken before, because you didn't know if what you were
> >> comparing was what it meant. for instance:
> >>
> >> where number='01000';
> >>
> >> should we cast the number to text, or the text to numeric?
> >>
> >> On Tue, Jan 3, 2012 at 3:44 PM, Thiago Braga Nobre
> >> <thiagobraganobre(at)gmail(dot)com> wrote:
> >> > was better before, thanks and happy 2012
> >> >
> >> >
> >> >
> >> > 2012/1/3 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> >> >>
> >> >> It was considered a bug when things were automagically cast before,
> >> >> it's considered fixed now. What's your query and table defs look
> >> >> like?
> >> >>
> >> >> On Tue, Jan 3, 2012 at 2:57 PM, Thiago Braga Nobre
> >> >> <thiagobraganobre(at)gmail(dot)com> wrote:
> >> >> > that's right
> >> >> >
> >> >> >
> >> >> > 2012/1/3 Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> >> >> >>
> >> >> >> On Tue, Jan 3, 2012 at 9:47 AM, Thiago Braga Nobre
> >> >> >> <thiagobraganobre(at)gmail(dot)com> wrote:
> >> >> >> > Hi
> >> >> >> > why in version 8.4.4 I have to do is cast in the previous
> version
> >> >> >> > of
> >> >> >> > PHP
> >> >> >> > itself postgres already identified this conversion?
> >> >> >> > thank you
> >> >> >>
> >> >> >> Are you referring to the absence of automatic type conversion on
> >> >> >> postgresql that started with version 8.3? I'm not sure what
> you're
> >> >> >> asking exactly.
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Atenciosamente,
> >> >> >
> >> >> > Thiago Braga Nobre
> >> >> > (21) 8527-9400
> >> >> >
> >> >> > http://br.linkedin.com/pub/thiago-braga-nobre/25/577/a08
> >> >> >
> >> >> > http://twitter.com/thiago_b_nobre
> >> >> >
> >> >> > thiagobraganobre(at)gmail(dot)com
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> To understand recursion, one must first understand recursion.
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Atenciosamente,
> >> >
> >> > Thiago Braga Nobre
> >> > (21) 8527-9400
> >> >
> >> > http://br.linkedin.com/pub/thiago-braga-nobre/25/577/a08
> >> >
> >> > http://twitter.com/thiago_b_nobre
> >> >
> >> > thiagobraganobre(at)gmail(dot)com
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> To understand recursion, one must first understand recursion.
> >
> >
> >
> >
> > --
> > Atenciosamente,
> >
> > Thiago Braga Nobre
> > (21) 8527-9400
> >
> > http://br.linkedin.com/pub/thiago-braga-nobre/25/577/a08
> >
> > http://twitter.com/thiago_b_nobre
> >
> > thiagobraganobre(at)gmail(dot)com
> >
> >
> >
> >
>
>
>
> --
> To understand recursion, one must first understand recursion.
>

--
*Atenciosamente,*
*
*Thiago Braga Nobre
(21) 8527-9400

http://br.linkedin.com/pub/thiago-braga-nobre/25/577/a08

http://twitter.com/thiago_b_nobre

thiagobraganobre(at)gmail(dot)com

In response to

  • Re: Bug at 2012-01-04 00:32:29 from Scott Marlowe

Responses

  • Re: Bug at 2012-01-27 17:30:08 from Robert Haas

Browse pgsql-docs by date

  From Date Subject
Next Message Jeff Davis 2012-01-05 09:47:14 Documentation and mutating PGresult objects
Previous Message Scott Marlowe 2012-01-04 00:32:29 Re: Bug