From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kevin Hale Boyes <kcboyes(at)gmail(dot)com> |
Cc: | Robert Haas <rhaas(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command. |
Date: | 2013-10-04 00:16:41 |
Message-ID: | CA+Tgmoa_0nHxNyXOMe6H_Cpwmdcp6_kGstkwOUDNLqo-qrPx3w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Thu, Oct 3, 2013 at 6:38 PM, Kevin Hale Boyes <kcboyes(at)gmail(dot)com> wrote:
> My C is very rusty but the traversal of SeqTableData doesn't seem correct.
> It saves the seqtab->next pointer into next, frees seqtab and then
> dereferences it.
> Shouldn't that last line be: seqtab = next?
>
> Kevin.
>
> +/*
> + * Flush cached sequence information.
> + */
> +void
> +ResetSequenceCaches(void)
> +{
> + SeqTableData *next;
> +
> + while (seqtab != NULL)
> + {
> + next = seqtab->next;
> + free(seqtab);
> + seqtab = seqtab->next;
> + }
Oops, good catch. Will fix, thanks.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-10-04 00:19:16 | pgsql: Fix silly thinko in ResetSequenceCaches. |
Previous Message | Kevin Hale Boyes | 2013-10-03 22:38:52 | Re: [COMMITTERS] pgsql: Add DISCARD SEQUENCES command. |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-10-04 00:51:08 | Re: GSOC13 proposal - extend RETURNING syntax |
Previous Message | Hannu Krosing | 2013-10-04 00:14:49 | Re: record identical operator |