diff options
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_statement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xcolumns.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xtables.cxx | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 55715b0504b1..805c7b9f963d 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -797,7 +797,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert( { // it even was no autovalue, no sense to continue as we can't query the // inserted row - buf.setLength(0); + buf.truncate(); break; } } diff --git a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx index cfb4bc5af733..36f3a4f8744c 100644 --- a/connectivity/source/drivers/postgresql/pq_xcolumns.cxx +++ b/connectivity/source/drivers/postgresql/pq_xcolumns.cxx @@ -404,7 +404,7 @@ void alterColumnByDescriptor( OUString pastDefaultValue = extractStringProperty( past, st.DEFAULT_VALUE ); if( futureDefaultValue != pastDefaultValue ) { - buf = OUStringBuffer( 128 ); + buf.truncate(); buf.append( "ALTER TABLE" ); bufferQuoteQualifiedIdentifier( buf, schemaName, tableName, settings ); buf.append( "ALTER COLUMN" ); @@ -422,7 +422,7 @@ void alterColumnByDescriptor( sal_Int32 pastNullable = extractIntProperty( past, st.IS_NULLABLE ); if( futureNullable != pastNullable ) { - buf = OUStringBuffer( 128 ); + buf.truncate(); buf.append( "ALTER TABLE" ); bufferQuoteQualifiedIdentifier( buf, schemaName, tableName, settings ); buf.append( "ALTER COLUMN" ); @@ -449,7 +449,7 @@ void alterColumnByDescriptor( if( futureComment != pastComment ) { - buf = OUStringBuffer( 128 ); + buf.truncate(); buf.append( "COMMENT ON COLUMN" ); bufferQuoteQualifiedIdentifier( buf, schemaName, tableName , futureColumnName, settings ); buf.append( "IS " ); diff --git a/connectivity/source/drivers/postgresql/pq_xtables.cxx b/connectivity/source/drivers/postgresql/pq_xtables.cxx index 63e6c6aeebf9..cbd5c3f2b695 100644 --- a/connectivity/source/drivers/postgresql/pq_xtables.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtables.cxx @@ -270,7 +270,7 @@ void Tables::appendByDescriptor( OUString description = extractStringProperty( descriptor, st.DESCRIPTION ); if( !description.isEmpty() ) { - buf = OUStringBuffer( 128 ); + buf.truncate(); buf.append( "COMMENT ON TABLE" ); bufferQuoteQualifiedIdentifier( buf, schema, name, m_pSettings ); buf.append( "IS " ); @@ -292,7 +292,7 @@ void Tables::appendByDescriptor( description = extractStringProperty( column,st.DESCRIPTION ); if( !description.isEmpty() ) { - buf = OUStringBuffer( 128 ); + buf.truncate(); buf.append( "COMMENT ON COLUMN " ); bufferQuoteQualifiedIdentifier( buf, schema, name, extractStringProperty( column, st.NAME ), m_pSettings ); |