Re: PostgreSQL 8.0 Feature List?

From: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>
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 20:53:16
Message-ID: m3k6vy6c03.fsf@conexa.fciencias.unam.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Welty <rwelty(at)averillpark(dot)net> writes:

> String query
> = "SELECT foo "
> + "FROM bar "
> + "WHERE baz = 'bletch';"

This particular expression is rewritten by the compiler to use
StringBuffer, so is equivalent to:

> StringBuffer query = new StringBuffer();
>
> query.append( "SELECT foo ");
> query.append( "FROM bar ");
> query.append( "WHERE baz = 'bletch';"
>
> return new String( query);

Maybe you are thinking in something like

String foo = ""
while(cond) {
foo += bar;
}

which is, indeed, quite inefficient.

Regards,
Manuel.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vikram 2004-08-16 22:24:16 Re: postgres in freebsd jail
Previous Message Gaetano Mendola 2004-08-16 20:30:42 Re: Does a 'stable' deferred trigger execution order exist?