Skip site navigation (1) Skip section navigation (2)

Re: WIP: pl/pgsql cleanup

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: WIP: pl/pgsql cleanup
Date: 2005-02-07 05:55:37
Message-ID: 1107755737.1286.46.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Attached is a revised patch. Changes:

- abandonded the falloc() idea. There really aren't that many
short-lived allocations in the PL/PgSQL compiler, and using falloc()
made it difficult to use List. Instead, make the CurrentMemoryContext
the long-lived function context, and explicitly pfree short-term
allocations. Not _all_ short-lived allocations are explicitly released;
if this turns out to be a problem, it can be cleaned up later.

- Rewrite various bits of parsing code to be less brain-damaged. Fix
four buffer overruns.

- Raise an error if more RAISE parameters were specified than were
required by the RAISE format string; also raise an error if there were
more parameters required by the format string than were specified.

Barring any objections, I'll apply this to HEAD tomorrow.


Attachment: plpgsql_cleanup-19.patch
Description: text/x-patch (98.1 KB)

In response to


pgsql-patches by date

Next:From: Ameen - EtemadyDate: 2005-02-07 14:20:28
Subject: Re: again: add collation support function
Previous:From: Andrew DunstanDate: 2005-02-06 16:15:56
Subject: fix CSV multiline parsing - proof of concept

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group