Re: Do we need use more meaningful variables to replace 0 in catalog head files?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Jan de Visser <jan(at)de-visser(dot)net>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Hao Lee <mixtrue(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Do we need use more meaningful variables to replace 0 in catalog head files?
Date: 2016-11-12 17:30:45
Message-ID: b76d153a-33d7-7827-746c-1109f7bf529d@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/11/2016 11:10 AM, Tom Lane wrote:
> boolin: OID=1242 proname=boolin proargtypes="cstring" prorettype=bool
> boolin: prosrc=boolin provolatile=i proparallel=s
>
>

I have written a little perl script to turn the pg_proc DATA lines into
something like the format suggested. In order to keep the space used as
small as possible, I used a prefix based on the OID. See attached result.

Still plenty of work to go, e.g. grabbing the DESCR lines, and turning
this all back into DATA/DESCR lines, but I wanted to get this out there
before going much further.

The defaults I used are below (commented out keys are not defaulted,
they are just there for completeness).

my %defaults = (
# oid =>
# name =>
namespace => 'PGNSP',
owner => 'PGUID',
lang => '12',
cost => '1',
rows => '0',
variadic => '0',
transform => '0',
isagg => 'f',
iswindow => 'f',
secdef => 'f',
leakproof => 'f',
isstrict => 'f',
retset => 'f',
volatile => 'v',
parallel => 'u',
# nargs =>
nargdefaults => '0',
# rettype =>
# argtypes =>
allargtypes => '_null_',
argmodes => '_null_',
argnames => '_null_',
argdefaults => '_null_',
trftypes => '_null_',
# src =>
bin => '_null_',
config => '_null_',
acl => '_null_',
);

cheers

andrew

Attachment Content-Type Size
proc_data_lines.txt text/plain 399.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-11-12 18:52:25 xlogreader.c fails with FATAL on a cluster with 4kB block size
Previous Message Magnus Hagander 2016-11-12 17:30:12 Re: Remove the comment on the countereffectiveness of large shared_buffers on Windows