Re: Add SPI results constants available for PL/*

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Christopher Browne <cbbrowne(at)gmail(dot)com>, Samuel PHAN <samuel(at)nomao(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add SPI results constants available for PL/*
Date: 2012-01-06 22:07:18
Message-ID: 20120106220718.GB31354@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 03, 2012 at 09:11:17PM -0500, Andrew Dunstan wrote:
> Yeah, I'm with you and Pavel. Here's my quick perl one-liner to
> produce a set of SPI_* constants for pl/perl. I'm looking at the
> best way to include this in the bootstrap code.
>
> perl -ne 'BEGIN { print "use constant\n{\n"; } END { print "};\n"; }
> print "\t$1 => $2,\n" if /#define (SPI_\S+)\s+\(?(-?\d+)\)?/;'
> src/include/executor/spi.h

Well, there's also h2ph, but that may be overkill...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.
-- Arthur Schopenhauer

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2012-01-06 22:17:09 Re: 16-bit page checksums for 9.2
Previous Message Robert Haas 2012-01-06 21:47:30 Re: Progress on fast path sorting, btree index creation time