Richard Welty <[EMAIL PROTECTED]> 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.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to