Re: adding new field

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: ranbeer makin <ranbeer(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: adding new field
Date: 2006-06-06 18:52:42
Message-ID: 20060606185242.GB9794@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2006-06-06 18:54:58 Re: AIX check in datetime.h
Previous Message Alvaro Herrera 2006-06-06 18:47:58 Re: How to avoid transaction ID wrap