pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jon Orris <jorris@redhat.com>
To: vadimn@redhat.com
Cc: pgsql-jdbc@postgresql.org
Cc: sebster@sebster.com
Subject: Re: \0 and IllegalArgumentException
Date: Fri, 29 Oct 2004 10:36:57 -0400
Message-ID: <1099060617.1377.3.camel@goodeats.boston.redhat.com> (raw)
In-Reply-To: <200410291024.03718@vadim.nasardinov>
References: <1099043710.595.50.camel@localhost>
	<200410291024.03718@vadim.nasardinov>

On Fri, 2004-10-29 at 10:24 -0400, Vadim Nasardinov wrote:
>  | test=> select str, length(str) as length from dropme;
>  |   str  | length 
>  | -------+--------
>  |  Hello |      5
>  | (1 row)
>  | 
>  | test=> select str, length(str) as length from dropme where str like '%world';
>  |   str  | length 
>  | -------+--------
>  |  Hello |      5
>  | (1 row)
>  | 
>  | test=> select str, length(str) as length from dropme where str like '%Welt';
>  |  str | length 
>  | -----+--------
>  | (0 rows)

> Not sure how the latest version behaves.

I get slightly different results from 7.4.5. The string is still
truncated, but the length is correct:

jorris=# select str, length(str) as length from dropme;
  str  | length
-------+--------
 Hello |     11
(1 row)

jorris=# select str, length(str) as length from dropme where str like '%
world';
  str  | length
-------+--------
 Hello |     11
(1 row)

jorris=#  select substring(version(), 1, 20) as version;
       version
----------------------
 PostgreSQL 7.4.5 on
(1 row)






view thread (6+ messages)  latest in thread

Message-ID: <1099060617.1377.3.camel@goodeats.boston.redhat.com>
Permalink:  ../1099060617.1377.3.camel@goodeats.boston.redhat.com/
Also on:    postgresql.org/message-id/1099060617.1377.3.camel@goodeats.boston.redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: jorris@redhat.com, vadimn@redhat.com, sebster@sebster.com
  Subject: Re: \0 and IllegalArgumentException
  In-Reply-To: <1099060617.1377.3.camel@goodeats.boston.redhat.com>
  References: <1099043710.595.50.camel@localhost> <200410291024.03718@vadim.nasardinov> <1099060617.1377.3.camel@goodeats.boston.redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox