Re: generating bootstrap entries for array types
От | ilmari@ilmari.org (Dagfinn Ilmari Mannsåker) |
---|---|
Тема | Re: generating bootstrap entries for array types |
Дата | |
Msg-id | d8jo9fc1m4d.fsf@dalvik.ping.uio.no обсуждение исходный текст |
Ответ на | generating bootstrap entries for array types (John Naylor <jcnaylor@gmail.com>) |
Ответы |
Re: generating bootstrap entries for array types
|
Список | pgsql-hackers |
Hi John, John Naylor <jcnaylor@gmail.com> writes: >> On 4/26/18, Tom Lane <tgl@sss.pgh.pa.us> wrote: >>> if I counted correctly. (Array entries should be ignored for this >>> purpose; maybe we'll autogenerate them someday.) >> >> Hmm, that wouldn't be too hard. Add a new metadata field called >> 'array_type_oid', then if it finds such an OID, teach genbki.pl to >> construct a tuple for the corresponding array type by consulting >> something like >> >> char typcategory BKI_ARRAY(A); >> char typstorage BKI_ARRAY(x); >> ...etc >> >> in the header file, plus copying typalign from the element type. I'll >> whip this up sometime and add it to the next commitfest. > > This turned out to be slightly more complicated than that, but still > pretty straightforward. Doing this in genbki.pl makes DBD::Pg lose its array type information, since it uses Catalog::ParseData() to get it (https://github.com/bucardo/dbdpg/blob/master/types.c#L439). May I suggest moving gen_array_types() to Catalog.pm and calling it from ParseData() if the input file is pg_type.dat, so that it always returns complete data? Thanks, - ilmari -- "A disappointingly low fraction of the human race is, at any given time, on fire." - Stig Sandbeck Mathisen
В списке pgsql-hackers по дате отправления: