Re: Foreign key bugs + other problems

Jan Wieck <janwieck@t-online.de>

From: JanWieck@t-online.de (Jan Wieck)
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: PostgreSQL HACKERS <pgsql-hackers@postgresql.org>
Date: 2000-07-11T22:30:28Z
Lists: pgsql-bugs, pgsql-hackers
Bruce Momjian wrote:
> > > Or, you might be able to make a case that you CANNOT shadow a table
> > > that is referenced by a constraint (due to the permanent table constraints
> > > cannot reference a temporary table restriction).  Since the creation of
> > > the temp table would break the restriction, it is illegal.
> >
> >     Good point. What does the standard say about it? Can a table,
> >     referred   to  by  foreign  key  constraints  or  referential
> >     actions, be shadowed by a temp table?
>
> Maybe we should prevent shadowing of a table that is used as a foreign
> key.

    And  open  another  DOS  attack  possibility? Each user could
    potentially create a permanent table of a name used as a temp
    table somewhere inside of an application. Then create another
    referencing it and boom - the application goes down. Not that
    good IMHO.

    I  think  we  need  to hand OID's to the RI triggers and have
    some special syntax to  tell  the  parser  that  a  table  or
    attribute is named by OID in the actual query.

    Will  cause  alot  of  headaches for the next pg_dump/restore
    cycle.

    (Bruce: still waiting for your call)


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #