Re: generating function default settings from pg_proc.dat
| От | Tom Lane |
|---|---|
| Тема | Re: generating function default settings from pg_proc.dat |
| Дата | |
| Msg-id | 1166845.1771269225@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: generating function default settings from pg_proc.dat (Andres Freund <andres@anarazel.de>) |
| Ответы |
Re: generating function default settings from pg_proc.dat
|
| Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes:
> I wish we could just generate the parse-analyzed representation for default
> values during bootstrap, but that's probably not realistic.
> Although, I guess we don't really need the full machinery. Afaict we just need
> a list of simple CONST nodes.
Const is enough to be problematic. In particular, the bytes of the
stored Datum are shown in physical order so that the results are
endian-dependent. We can't have machine dependencies in postgres.bki.
I suppose it might be possible to rethink the printed representation
of Const nodes to dodge that problem, but that's starting to make the
project seem rather complex. Even without that, hand-maintained
byte-level representations of jsonb, float8, text[] seem like a pretty
bad idea.
I think what we'd really want here is some smarts in backend bootstrap
mode to be able to invoke the correct datatype input function to
convert the type's standard string representation into a Datum.
I wonder how complicated that'd be.
regards, tom lane
В списке pgsql-hackers по дате отправления: