On Wed, Apr 28, 2004 at 10:13:14 +0200,
Edoardo Ceccarelli <[EMAIL PROTECTED]> wrote:
> do you mean that, declaring an index serial, I'd never have to deal with
> incrementing its primary key? good to know!
That isn't what is happening. Serial is a special type. It is int plus
a default rule li
do you mean that, declaring an index serial, I'd never have to deal with
incrementing its primary key? good to know!
Yep. You can use 'DEFAULT' as the value, eg:
INSERT INTO blah (DEFAULT, ...);
anyway in this particular situation I don't need such accurate
behaviour: this table is filled up wit
do you mean that, declaring an index serial, I'd never have to deal with
incrementing its primary key? good to know!
anyway in this particular situation I don't need such accurate
behaviour: this table is filled up with a lot of data twice per week and
it's used only to answer queries.
I could
I am going to use them as primary key of the table, so I'll surely need
them unique :)
Eduoardo, I REALLY suggest you don't use them at all. You should make a
primary key like this:
CREATE TABLE blah (
id SERIAL PRIMARY KEY,
...
);
Also note that by default, OIDs are NOT dumped by pg_dump.
I am going to use them as primary key of the table, so I'll surely need
them unique :)
thank you for you help
Edoardo
Dave Cramer ha scritto:
Edoardo,
Are you using them for referential integrity? If so you would be wise to
use sequences instead.
Christopher: yes you are correct, I wasn't sur
Edoardo,
Are you using them for referential integrity? If so you would be wise to
use sequences instead.
Christopher: yes you are correct, I wasn't sure if that is what he was
doing.
Dave
On Tue, 2004-04-27 at 11:01, Christopher Kings-Lynne wrote:
> > AFAIK, oids aren't used for anything inter
AFAIK, oids aren't used for anything internally, so duplicates don't
really matter. Besides, what would you do about duplicate oid's ?
If he's using them _externally_, then he does have to worry about
duplicates.
Chris
---(end of broadcast)---
TIP 5
AFAIK, oids aren't used for anything internally, so duplicates don't
really matter. Besides, what would you do about duplicate oid's ?
The best suggestion is of course his last, don't use them.
On Mon, 2004-04-26 at 22:48, Christopher Kings-Lynne wrote:
> > I am using the oid of the table as the