In 7.4 there is an optional BY that are allowed in the definiton of 
sequences:

CREATE [ TEMPORARY | TEMP ] SEQUENCE namn [ INCREMENT [ BY ] ï¿½kning ]
    [ MINVALUE minvï¿½rde | NO MINVALUE ] [ MAXVALUE maxvï¿½rde | NO MAXVALUE ]
    [ START [ WITH ] start ] [ CACHE cache ] [ [ NO ] CYCLE ]

(some swedish strings there, but still readable for you)

pg_dump uses this optional keyword BY which seems like a bad idea if one 
wants to import it into a 7.3 database. Use the 7.3 dump you might say, 
but since BY does not do anything why not remove it from the dump output?

-- 
/Dennis Bjï¿½rklund


Wed, 7 Apr 2004 10:01:36 +0200 (CEST)
Dennis Bjorklund <db@zigo.dhs.org>
pg_dump and INCREMENT BY
On Wed, 7 Apr 2004, Dennis Bjorklund wrote:

Replying to myself here :-)

> wants to import it into a 7.3 database. Use the 7.3 dump you might say, 
> but since BY does not do anything why not remove it from the dump output?

I just realized there is yet another new construct in 7.4. The sequences
are created with NO MAXVALUE (and MINVALUE). Couldn't these just be
removed in the pg_dump output in this case. It's the default anyway,
right.

I just imported a fairly big dump from a 7.4 database into a 7.3 database 
and the sequences was the only thing I had to change. Of course the 
database in itself was designed on 7.3 so it didn't use any 7.4 features.

It's not a big issue, it's just that it seems simple to dump SQL code (for
sequences) that work the same on both 7.4 and older, not just 7.4.

-- 
/Dennis Bjï¿½rklund


Wed, 7 Apr 2004 10:16:36 +0200 (CEST)
Dennis Bjorklund <db@zigo.dhs.org>
Re: pg_dump and INCREMENT BY
Dennis Bjorklund <db@zigo.dhs.org> writes:
> I just realized there is yet another new construct in 7.4. The sequences
> are created with NO MAXVALUE (and MINVALUE). Couldn't these just be
> removed in the pg_dump output in this case. It's the default anyway,
> right.

IIRC, these changes were to bring the syntax in line with the SQL200x
spec, and thus possibly improve compatibility with other databases.
I'm not eager to revert them.

			regards, tom lane

Wed, 07 Apr 2004 11:08:19 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_dump and INCREMENT BY 
On Wed, 7 Apr 2004, Dennis Bjorklund wrote:

> On Wed, 7 Apr 2004, Dennis Bjorklund wrote:
> 
> Replying to myself here :-)
> 
> > wants to import it into a 7.3 database. Use the 7.3 dump you might say, 
> > but since BY does not do anything why not remove it from the dump output?
> 
> I just realized there is yet another new construct in 7.4. The sequences
> are created with NO MAXVALUE (and MINVALUE). Couldn't these just be
> removed in the pg_dump output in this case. It's the default anyway,
> right.
> 
> I just imported a fairly big dump from a 7.4 database into a 7.3 database 
> and the sequences was the only thing I had to change. Of course the 
> database in itself was designed on 7.3 so it didn't use any 7.4 features.
> 
> It's not a big issue, it's just that it seems simple to dump SQL code (for
> sequences) that work the same on both 7.4 and older, not just 7.4.

Maybe a switch to set the destination version would be a good compromise?


Wed, 7 Apr 2004 13:46:42 -0600 (MDT)
"scott.marlowe" <scott.marlowe@ihs.com>
Re: pg_dump and INCREMENT BY