And the answer to my second question:
A global (db-wide) SEQUENCE is possible. I made a mistake and didn't
give the column type as bigint...
--b
On Wed, 14 May 2003 18:47:56 +0200
"Bud P. Bruegger" <bu...@si...> wrote:
> On the first issue, I just verified and PostgreSQL 7.3 also drops the
> sequence when dropping the table.
>
> On Wed, 14 May 2003 18:43:17 +0200
> "Bud P. Bruegger" <bu...@si...> wrote:
>
> > I would like to bring up two Postgres questions/issues:
> >
> > Q1: Table Dropping and left-over sequences:
> > --------------------------------------------
> >
> > I found the following
> >
> > <quote src=http://www.phpbuilder.com/columns/tim20000705.php3:>
> > At this point, I ran into another small issue with Postgres - its
> > "serial" data type (the equivalent of MySQL's auto_increment) creates
> > a "sequence" which does not get dropped when its parent table is
> > dropped. So if you try to re-create the table, you'll get a name
> > conflict for this sequence. A lot of new users would be confused by
> > this, so Postgres loses a couple points for that. Also, MySQL is
> > "smart" enough to increment its auto_increment value when you import
> > data, whereas Postgres' sequence does not get reset when you import
> > data, causing all new inserts to fail.
> > </quote>
> >
> > Does that mean that the dropTable method of SQLObject should also drop
> > the sequences?
> >
> > Q2: Global sequence possible?
> > -----------------------------
> >
> > I was thinking of having IDs that are unique across tables--something
> > useful when thinking of implementing inheritance etc. So I tried to
> > create a global sequence and have the id columns of several tables use
> > it for their default values (DEFAULT nextval('global_oid_seq')). But
> > that seems to fail. Can there be only a single column (of a single
> > table) associated with a sequence???
> >
> > many thanks
> >
> > --b
> >
> > /-----------------------------------------------------------------
> > | Bud P. Bruegger, Ph.D.
> > | Sistema (www.sistema.it)
> > | Via U. Bassi, 54
> > | 58100 Grosseto, Italy
> > | +39-0564-411682 (voice and fax)
> > \-----------------------------------------------------------------
> >
> >
> > -------------------------------------------------------
> > Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> > The only event dedicated to issues related to Linux enterprise solutions
> > www.enterpriselinuxforum.com
> >
> > _______________________________________________
> > sqlobject-discuss mailing list
> > sql...@li...
> > https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
> >
>
>
> /-----------------------------------------------------------------
> | Bud P. Bruegger, Ph.D.
> | Sistema (www.sistema.it)
> | Via U. Bassi, 54
> | 58100 Grosseto, Italy
> | +39-0564-411682 (voice and fax)
> \-----------------------------------------------------------------
>
>
> -------------------------------------------------------
> Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> The only event dedicated to issues related to Linux enterprise solutions
> www.enterpriselinuxforum.com
>
> _______________________________________________
> sqlobject-discuss mailing list
> sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
>
/-----------------------------------------------------------------
| Bud P. Bruegger, Ph.D.
| Sistema (www.sistema.it)
| Via U. Bassi, 54
| 58100 Grosseto, Italy
| +39-0564-411682 (voice and fax)
\-----------------------------------------------------------------
|