From: | Zeugswetter Andreas DBT <Andreas(dot)Zeugswetter(at)telecom(dot)at> |
---|---|
To: | "'pgsql-hackers(at)hub(dot)org'" <pgsql-hackers(at)hub(dot)org> |
Subject: | Re: atttypmod of 0 |
Date: | 1998-02-05 17:23:59 |
Message-ID: | 219F68D65015D011A8E000006F8590C6010A51BB@sdexcsrv1.sd.spardat.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This time it's during the parser (gdb told me). varcharin()
is called with a atttypmod of 0 causing a palloc() of 0
bytes. How should a VARCHAR type whithout a specified length
behave? Is this type 1 character or a variable size up to
4096?
I thought we fixed this on Feb 3. look at
parse_expr.c line 104: it should read:
if (con->typename != NULL)
! result = parser_typecast(val,
con->typename, -1);
else
I think all funcs calling with atttypmod = 0 are allways wrong, should
be -1.
or a number > 0 (or 4 if atttypmod includes the VARHDRSZ don't know)
Andreas
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-02-05 17:24:16 | index with nulls |
Previous Message | Bruce Momjian | 1998-02-05 17:18:28 | Re: [HACKERS] Re: [QUESTIONS] impossible insert data into VARCHAR |