1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Fix pg_dump to dump serial columns as serials. Per pghackers discussion,

cause SERIAL column declaration not to imply UNIQUE, so that this can be
done without creating an extra index.
This commit is contained in:
Tom Lane
2002-08-19 19:33:36 +00:00
parent 6ebc90b045
commit a0bf1a7f2e
8 changed files with 249 additions and 100 deletions

View File

@ -6,7 +6,6 @@ CREATE TABLE x (
e text
);
NOTICE: CREATE TABLE will create implicit sequence 'x_a_seq' for SERIAL column 'x.a'
NOTICE: CREATE TABLE / UNIQUE will create implicit index 'x_a_key' for table 'x'
CREATE FUNCTION fn_x_before () RETURNS OPAQUE AS '
BEGIN
NEW.e := ''before trigger fired''::text;

View File

@ -137,7 +137,6 @@ INSERT INTO iportaltest (i, d, p)
---
CREATE TABLE serialTest (f1 text, f2 serial);
NOTICE: CREATE TABLE will create implicit sequence 'serialtest_f2_seq' for SERIAL column 'serialtest.f2'
NOTICE: CREATE TABLE / UNIQUE will create implicit index 'serialtest_f2_key' for table 'serialtest'
INSERT INTO serialTest VALUES ('foo');
INSERT INTO serialTest VALUES ('bar');
INSERT INTO serialTest VALUES ('force', 100);

View File

@ -59,11 +59,10 @@ SELECT relname, relhasindex
pg_trigger | t
pg_type | t
road | t
serialtest | t
shighway | t
tenk1 | t
tenk2 | t
(53 rows)
(52 rows)
--
-- another sanity check: every system catalog that has OIDs should have