| From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
| Cc: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com> |
| Subject: | Re: New pg_lsn type doesn't have hash/btree opclasses |
| Date: | 2014-05-06 23:25:19 |
| Message-ID: | CAB7nPqSxm-U0_+-YDMWtbNHq=MR+umWhA==Bg65dt+eOh0VGgQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, May 7, 2014 at 8:22 AM, Andres Freund <andres(at)2ndquadrant(dot)com> wrote:
> Uh. They're different:
>
> Datum
> timestamp_hash(PG_FUNCTION_ARGS)
> {
> /* We can use either hashint8 or hashfloat8 directly */
> #ifdef HAVE_INT64_TIMESTAMP
> return hashint8(fcinfo);
> #else
> return hashfloat8(fcinfo);
> #endif
> }
> note it's passing fcinfo, not the datum as you do. Same with
> time_hash.. In fact your version crashes when used because it's
> dereferencing a int8 as a pointer inside hashfloat8.
Thanks, didn't notice that fcinfo was used.
--
Michael
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2014-05-07 00:13:11 | Re: Wanted: jsonb on-disk representation documentation |
| Previous Message | Andres Freund | 2014-05-06 23:22:53 | Re: New pg_lsn type doesn't have hash/btree opclasses |