Thread: Dropping fields

Dropping fields

From
"Robert Fitzpatrick"
Date:
When I drop a field, the field is somewhat left over as
'........pg.dropped.5........', for instance. Is there a command that
needs to be ran after dropping a field?

--
Robert



Re: Dropping fields

From
Tom Lane
Date:
"Robert Fitzpatrick" <robert@webtent.com> writes:
> When I drop a field, the field is somewhat left over as
> '........pg.dropped.5........', for instance. Is there a command that
> needs to be ran after dropping a field?

Fix your application to ignore pg_attribute rows where attisdropped
is true.

            regards, tom lane

Re: Dropping fields

From
Bruce Momjian
Date:
All applications must now check for dropped columns and not print them.
There is a new pg_attribute.attisdropped for this.

---------------------------------------------------------------------------

Robert Fitzpatrick wrote:
> When I drop a field, the field is somewhat left over as
> '........pg.dropped.5........', for instance. Is there a command that
> needs to be ran after dropping a field?
>
> --
> Robert
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Dropping fields

From
"Robert Fitzpatrick"
Date:
>
> Fix your application to ignore pg_attribute rows where
> attisdropped is true.
>

So, PostgreSQL 7.3.x now holds all dropped fields information? What is
the purpose?

--
Robert



Re: Dropping fields

From
Doug McNaught
Date:
"Robert Fitzpatrick" <robert@webtent.com> writes:

> >
> > Fix your application to ignore pg_attribute rows where
> > attisdropped is true.
> >
>
> So, PostgreSQL 7.3.x now holds all dropped fields information? What is
> the purpose?

It's the way column dropping is implemented.  You couldn't drop
columns at all before 7.3.

-Doug