Tao Ma feng_e...@163.com writes:
Is it really important to show the
'bpchar' if there is no any explicit casting for the column default value.
Yeah. We cannot say char because per SQL spec, that means char(1),
but there mustn't be a restriction to a single character here.
regression=# select
Tom Lane t...@sss.pgh.pa.us wrote:
Tao Ma feng_e...@163.com writes:
Is it really important to show the 'bpchar' if there is no any
explicit casting for the column default value.
Yeah. We cannot say char because per SQL spec, that means
char(1), but there mustn't be a restriction to a
Thank you for your reply to the question. If it was chosen to reproduce the
actual semantics of the expression in various contexts, I think the bpchar
type of 'abc'::bpchar is surprised me. Is it really important to show the
'bpchar' if there is no any explicit casting for the column default
Hi,
Recently, I am reading the postgres codes, and I have a question about the
deparsing some expressions which is contains Const node. The following SQL
will retrieve the definition stored by postgres database for table t:
CREATE TABLE t (c1 CHAR(5) DEFAULT 'abc',
c2 CHAR(5)
Tao Ma feng_e...@163.com writes:
CREATE TABLE t (c1 CHAR(5) DEFAULT 'abc',
c2 CHAR(5) DEFAULT 'abc'::CHAR(5));
SELECT pg_get_expr(adbin, adrelid)
FROM pg_attrdef
WHERE adrelid = (SELECT oid FROM pg_class WHERE relname = 't');
pg_get_expr