Re: polymorphic arguments and return type for PL/pgSQL - Mailing list pgsql-patches

From Joe Conway
Subject Re: polymorphic arguments and return type for PL/pgSQL
Date
Msg-id 3F0078FF.8080605@joeconway.com
Whole thread Raw
In response to Re: polymorphic arguments and return type for PL/pgSQL  (Joe Conway <mail@joeconway.com>)
Responses Re: polymorphic arguments and return type for PL/pgSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Joe Conway wrote:
> Tom Lane wrote:
>> (It might be time to change the  cache lookup into a hashtable instead of
>> a simple linear list search...)
>
> I could do that if you want, but do you really think it's worth it? How
> long does a linked list have to get before a hash table starts to be a
> win (this is something I've always wondered about anyway)?

I was about to start looking at the hash table implementation and have a
question. Do you think it would be better to do

1) a hash lookup by function oid to a linked list of different compiled
versions (for each set of argument/return types)
   -or-
2) create hash key using a new structure that includes function oid,
return type, and argument types, and use that for direct lookup.

#1 looks easier, and given the waning hours might be more likely to get
finished. #2 is probably preferable, but a bit more work.

Thoughts?

Thanks,

Joe


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgresql.conf, initdb patch
Next
From: Tom Lane
Date:
Subject: Re: polymorphic arguments and return type for PL/pgSQL