WHERE relkind = 'r' OR
relkind = 'i' OR
relkind = 't'\"`"
- # Don't move over 7.1 sequences; use setval() file
- if [ "$SRC_VERSION" != "7.1" ]
+ # Don't move over 7.1 int4 sequences; use setval() file.
+ # Sequence XIDs changed from 7.2beta4 to beta5; don't copy them.
+ if [ "$SRC_VERSION" != "7.1" -a \
+ "$SRC_VERSION" != "7.2" ]
then QUERY="$QUERY OR relkind = 'S';";
QUERY="$QUERY;"
fi
make_dbobjoidmap > "$INFODIR"/dbobjoidmap
# Generate setval() script for 7.1 because it has int4 sequences
-
- if [ "$SRC_VERSION" = "7.1" ]
+ # Sequence XIDs changed from 7.2beta4 to beta5; we have to recreate them.
+ if [ "$SRC_VERSION" = "7.1" -o \
+ "$SRC_VERSION" = "7.2" ]
then
psql -d template1 -At -c "SELECT datname FROM pg_database" |
grep -v '^template0$' |
# Set sequence values for 7.1-version sequences, which were int4.
-if [ "$SRC_VERSION" = "7.1" ]
-then echo "Set int8 sequence values from 7.1..."
+if [ "$SRC_VERSION" = "7.1" -o \
+ "$SRC_VERSION" = "7.2" ]
+then echo "Set sequence values..."
psql -d template1 -At < "$INFODIR"/setval
if [ $? -ne 0 ]
then echo "There were errors during int4 sequence restore.