RE: DROP COLUMN status

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема RE: DROP COLUMN status
Дата
Msg-id 000b01bfd1a7$2faeed40$2801007e@tpf.co.jp
обсуждение исходный текст
Ответ на RE: DROP COLUMN status  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Список pgsql-hackers
> -----Original Message-----
> From: Hiroshi Inoue
> Sent: Friday, June 09, 2000 3:02 AM
>
> > -----Original Message-----
> > From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> >
> > "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> > > The implementation makes the dropped column invisible by
> > > changing its attnum to -attnum - offset(currently 20) and
> > > attnam to ("*already Dropped%d",attnum).
> >
> > Ugh.  No wonder you had to hack so many places in such an ugly fashion.
> > Why not leave the attnum as-is, and just add a bool saying "column is
> > dropped" to pg_attribute?
>
> Anyway I had hidden details behind MACROs mostly so it
> wouldn't be so difficult to change the implementation as
> you suggests.
>

I'm using the following macros(in pg_attribute.h) in my implementation.
DROP_COLUMN_INDEX() is used only once except pg_attribute.h.
If there are COLUMN_IS_DROPPED() macros,doesn't it mean that
they should be changed at any rate ?

#ifdef  _DROP_COLUMN_HACK__
/**      CONSTANT and MACROS for DROP COLUMN implementation*/
#define DROP_COLUMN_OFFSET      -20
#define COLUMN_IS_DROPPED(attribute)    ((attribute)->attnum <=
DROP_COLUMN_OFFS
ET)
#define DROPPED_COLUMN_INDEX(attidx)    (DROP_COLUMN_OFFSET - attidx)
#define ATTRIBUTE_DROP_COLUMN(attribute) \       Assert((attribute)->attnum > 0); \       (attribute)->attnum =
DROPPED_COLUMN_INDEX((attribute)->attnum);\       (attribute)->atttypid = (Oid) -1; \       (attribute)->attnotnull =
false;\       (attribute)->atthasdef = false;
 
#endif   /* _DROP_COLUMN_HACK__ */

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Giles Lean
Дата:
Сообщение: Re: Sigh, LIKE indexing is *still* broken in foreign locales
Следующее
От: Erich Stamberger
Дата:
Сообщение: Re: Sigh, LIKE indexing is *still* broken in foreign locales