Re: adding new field

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: adding new field
Дата
Msg-id 20060606185242.GB9794@svana.org
обсуждение исходный текст
Ответ на Re: adding new field  ("ranbeer makin" <ranbeer@gmail.com>)
Список pgsql-hackers
On Tue, Jun 06, 2006 at 09:44:04PM +0530, ranbeer makin wrote:
> hey,
> let me clarify something.....
>
> 1. Whenever you run a query, its result or some other thing gets cached. I
> want to flush this cache? Also let me know when this cache gets flushed
> automatically.

What cache? Query results are not cached, neither are plans. Please be
specific.

> 2. After adding a new field in Resdom structure and making necessary changes
> in outfuncs.c, createfuncs. etc files, I *sometimes* get garbage value for
> the field added. The field is initialiazed to zero in makefuns.c....

Check for other places in the code that create that structure. makefunc
is more convienience than anything else.

> 3. **IMP*** Is there something in postgres that, only for N number of
> fields, of a structure, the memory is allocated, i.e., do I need to modify
> this "N" somewhere to reflect the addtion of a new field.

Postgres uses sizeof() always, so as long as all the files are compiled
the same way, everything will work.

> And that *weird* thing is:
>
> 1. I run some query, didn't get results.
> 2. Then, I commented the part which I modified [ i.e., commented that new
> field in Resdom structure], again run the same query, got results.
> 3. Next, I uncommented that part, and ran the same query again. I GOT THE
> RESULTS.

Did you rerun make install and restart the postmaster between each run?

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: How to avoid transaction ID wrap
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: AIX check in datetime.h