Postgres can't do that on it's own, you need to supply the complete defintion of the new table, to allow, recreating the table and copying the content over to the new table
Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table, to allow, recreating the table and copying the content over to the new table
Save the content into a temp. table, drop and recreate the original table and copy the content back in
We also take care to set the values of the sequenz and recreate the indexes. All this is done in a transaction, to not loose the content of the table, if something went wrong!
Tags:
return:
with SQL strings
internal:
Parameters:
string
$tabname
table-name
string
$dropflds
column-names to drop
string
$tableflds
complete defintion of the new table, eg. for postgres
array/string
$tableoptions
options for the new table see CreateTableSQL, default ''