Re: PostgreSQL 8.0 Feature List? - Mailing list pgsql-general

From Manuel Sugawara
Subject Re: PostgreSQL 8.0 Feature List?
Date
Msg-id m3k6vy6c03.fsf@conexa.fciencias.unam.mx
Whole thread Raw
In response to Re: PostgreSQL 8.0 Feature List?  (Richard Welty <rwelty@averillpark.net>)
List pgsql-general
Richard Welty <rwelty@averillpark.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.

pgsql-general by date:

Previous
From: Gaetano Mendola
Date:
Subject: Re: Does a 'stable' deferred trigger execution order exist?
Next
From: Vikram
Date:
Subject: Re: postgres in freebsd jail