Andres Freund <[email protected]> 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


Reply via email to