Re: PostgreSQL 8.0 Feature List?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Richard Welty <rwelty(at)averillpark(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL 8.0 Feature List?
Date: 2004-08-16 15:54:38
Message-ID: Pine.BSO.4.56.0408161046270.9187@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 14 Aug 2004, Richard Welty wrote:

> the authors of 98%-99% of all introductory java textbooks have
> a lot to answer for. my favorite example of the lot is that
> they all teach programmers to use String in the following manner:
>
> String query
> = "SELECT foo "
> + "FROM bar "
> + "WHERE baz = 'bletch';"
>

There is actually nothing wrong with this particular example. I realize
you are pointing out an issue that can happen, so this is a just "for the
record" post. In this case the concatenation is done at compile time.
See:

http://www.java-performance-portal.org/article6.html

Further the usage of string concatenation is easier to read/write so you
need to actually consider wether the code in question is actually a
hotspot and worth StringBuffer(ifying). Again your example is pointing to
a database query in which case so many other things are going on it's
unlikely to make any performance difference.

Kris Jurka

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2004-08-16 16:05:58 Re: where can i download pgs 7.3.x ?
Previous Message Bruce Momjian 2004-08-16 15:28:32 Re: Problem when installing dbsize of PG 8.0-beta1