palloc() vs static define? - Mailing list pgsql-hackers

From The Hermit Hacker
Subject palloc() vs static define?
Date
Msg-id Pine.BSF.4.05.9812132335480.6029-100000@thelab.hub.org
Whole thread Raw
Responses Re: [HACKERS] palloc() vs static define?
Re: [HACKERS] palloc() vs static define?
List pgsql-hackers
in commands/cluster.c, in function cluster, we define NewIndexName as:

char    NewIndexName[NAMEDATALEN]; /* line 93 */

in function copy_index, we define it as:

char          *NewIndexName; /* line 246 */

And then palloc(NAMEDATALEN) before it gets used...

Now, which we use doesn't much matter to me, but I would think some sort
of consistency would be in order...or am I missing something as far as
each are concerned?  Is one method inheriently faster then another, or do
they have about the same performance characteristics?

Marc G. Fournier                                
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: catalog/heap.c...
Next
From: The Hermit Hacker
Date:
Subject: Please check: commands/dbcommands.c