diff -c -r postgresql-snapshot/doc/src/sgml/datatype.sgml postgresql-snapshot-new/doc/src/sgml/datatype.sgml
*** postgresql-snapshot/doc/src/sgml/datatype.sgml 2011-06-07 02:54:24.000000000 -0400
--- postgresql-snapshot-new/doc/src/sgml/datatype.sgml 2011-06-07 20:29:52.000000000 -0400
***************
*** 199,204 ****
--- 199,210 ----
+ smallserial
+ serial2
+ autoincrementing two-byte integer
+
+
+
serial
serial4
autoincrementing four-byte integer
***************
*** 369,374 ****
--- 375,387 ----
+ smallserial
+ 2 bytes
+ small autoincrementing integer
+ 1 to 32767
+
+
+
serial>
4 bytes
autoincrementing integer
***************
*** 743,748 ****
--- 756,765 ----
Serial Types
+ smallserial
+
+
+
serial
***************
*** 751,756 ****
--- 768,777 ----
+ serial2
+
+
+
serial4
***************
*** 769,776 ****
! The data types serial and bigserial
! are not true types, but merely
a notational convenience for creating unique identifier columns
(similar to the AUTO_INCREMENT property
supported by some other databases). In the current
--- 790,797 ----
! The data types serial, smallserial and
! bigserial are not true types, but merely
a notational convenience for creating unique identifier columns
(similar to the AUTO_INCREMENT property
supported by some other databases). In the current
***************
*** 828,834 ****
the same way, except that they create a bigint
column. bigserial should be used if you anticipate
the use of more than 231> identifiers over the
! lifetime of the table.
--- 849,857 ----
the same way, except that they create a bigint
column. bigserial should be used if you anticipate
the use of more than 231> identifiers over the
! lifetime of the table. The type smallserial and
! serial2 also work the same way, execpt that they
! create a smallint column.
diff -c -r postgresql-snapshot/doc/src/sgml/ecpg.sgml postgresql-snapshot-new/doc/src/sgml/ecpg.sgml
*** postgresql-snapshot/doc/src/sgml/ecpg.sgml 2011-06-07 02:54:24.000000000 -0400
--- postgresql-snapshot-new/doc/src/sgml/ecpg.sgml 2011-06-07 20:19:33.000000000 -0400
***************
*** 845,850 ****
--- 845,855 ----
+ smallserial
+ short
+
+
+
serial
int
diff -c -r postgresql-snapshot/doc/src/sgml/func.sgml postgresql-snapshot-new/doc/src/sgml/func.sgml
*** postgresql-snapshot/doc/src/sgml/func.sgml 2011-06-07 02:54:24.000000000 -0400
--- postgresql-snapshot-new/doc/src/sgml/func.sgml 2011-06-07 20:23:09.000000000 -0400
***************
*** 13366,13372 ****
pg_get_serial_sequence(table_name, column_name)
text
! get name of the sequence that a serial or bigserial column
uses
--- 13366,13372 ----
pg_get_serial_sequence(table_name, column_name)
text
! get name of the sequence that a serial, smallserial or bigserial column
uses
diff -c -r postgresql-snapshot/src/backend/parser/parse_utilcmd.c postgresql-snapshot-new/src/backend/parser/parse_utilcmd.c
*** postgresql-snapshot/src/backend/parser/parse_utilcmd.c 2011-06-07 02:54:24.000000000 -0400
--- postgresql-snapshot-new/src/backend/parser/parse_utilcmd.c 2011-06-07 19:37:55.000000000 -0400
***************
*** 307,313 ****
{
char *typname = strVal(linitial(column->typeName->names));
! if (strcmp(typname, "serial") == 0 ||
strcmp(typname, "serial4") == 0)
{
is_serial = true;
--- 307,320 ----
{
char *typname = strVal(linitial(column->typeName->names));
! if (strcmp(typname, "smallserial") == 0 ||
! strcmp(typname, "serial2") == 0)
! {
! is_serial = true;
! column->typeName->names = NIL;
! column->typeName->typeOid = INT2OID;
! }
! else if (strcmp(typname, "serial") == 0 ||
strcmp(typname, "serial4") == 0)
{
is_serial = true;