Re: Add SPI results constants available for PL/* - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Add SPI results constants available for PL/*
Date
Msg-id 20120106220718.GB31354@svana.org
Whole thread Raw
In response to Re: Add SPI results constants available for PL/*  (Andrew Dunstan <andrew@dunslane.net>)
List 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@svana.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

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Progress on fast path sorting, btree index creation time
Next
From: Merlin Moncure
Date:
Subject: Re: 16-bit page checksums for 9.2