From: | "Chad N(dot) Tindel" <chad(at)tindel(dot)net> |
---|---|
To: | "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com> |
Cc: | "Chad N(dot) Tindel" <chad(at)tindel(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-docs(at)postgresql(dot)org |
Subject: | Re: Mysql -> Postgresql pitfalls |
Date: | 2003-08-04 19:29:48 |
Message-ID: | 20030804192948.GA48747@calma.pair.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
> > > FWIW, in 7.5 we're likely to implement SQL3 IDENTITY columns ... basically
> > > just a SERIAL column where you don't have the option of inserting your own
> > > value, you have to take what it gives you.
> >
> > Interesting... how do you import data from a dump with such columsn?
>
> Easy, after you import the last row, you
>
> select setval('seqname',lastvalue);
>
> on the sequence. Like I said above, it's mostly just a different way of
> doing things in Postgresql, and often those different ways are less
> obvious, and quite often, being less obvious is actually safer even if
> it is a littler harder to learn up front.
But you just said that I can't actually include the id column in an insert
query. So how would I import data from a dump and ensure that the id columns
are what I expect them to be?
Chad
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2003-08-04 21:01:29 | Re: Mysql -> Postgresql pitfalls |
Previous Message | scott.marlowe | 2003-08-04 19:26:50 | Re: Mysql -> Postgresql pitfalls |