Re: using DROP in a transaction

From: Chris <dmagick(at)gmail(dot)com>
To: Willy-Bas Loos <willybas(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: using DROP in a transaction
Date: 2008-02-15 04:10:03
Message-ID: 47B5109B.605@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> ==in TTY1==
> --11. expect result at last, value 2 only. (concurrent transaction
> 2 (in TTY3) completes after this, and will delete values 2 and 4
> (added after select was issued) upon commit)
> --11. true result: ERROR: relation <large nr> deleted while still in
> use

The table 'test' which tty1 was looking at (which was dropped in tty2)
doesn't exist any more.

Postgres doesn't look at the name, it looks at the id that is created
behind the scenes.

So in tty1, the id is 'x'.
Then you recreate the table in tty2 which gives it id 'y'.

So tty1 looking at id 'x' doesn't exist any more.

--
Postgresql & php tutorials
http://www.designmagick.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris 2008-02-15 04:14:53 Re: the feasibility of sending email from stored procedure in Postgres
Previous Message Joshua D. Drake 2008-02-15 04:05:42 Re: the feasibility of sending email from stored procedure in Postgres