| From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: suspicious pointer/integer coersion |
| Date: | 2005-07-10 20:31:17 |
| Message-ID: | 42D18595.6040104@dunslane.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane wrote:
>Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>
>
>>I have just noticed this code in plperl.c:
>>
>>
>
>
>
>> hv_store(plperl_proc_hash, internal_proname, proname_len,
>> newSViv((IV) prodesc), 0);
>>
>>
>
>
>
>>basically, here prodesc is a pointer to a struct, and we are storing it
>>as an integer in a perl hash for easy lookup by stringified oid.
>>
>>
>
>
>
>>How safe is this conversion on 64 bit platforms?
>>
>>
>
>Not at all. I'd vote for converting the whole thing to a dynahash
>hashtable ...
>
>
>
>
Works for me. There are some other things about the procdesc stuff I'm
trying to sort out (especially if we should be storing per-call info
inside it).
Cleaning this up is definitely a TODO.
cheers
andrew
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Fetter | 2005-07-10 20:40:04 | Re: Hide source code |
| Previous Message | Bruce Momjian | 2005-07-10 20:12:03 | plperl warning |