mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Move get_attdisbursion to lsyscache. Clean up get_typdefault.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.28 1999/08/09 00:51:26 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.29 1999/08/09 03:13:31 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -297,12 +297,12 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
|
||||
{
|
||||
case T_Const: /* INSERT command */
|
||||
{
|
||||
struct varlena *typedefault = get_typdefault(atttype);
|
||||
Datum typedefault = get_typdefault(atttype);
|
||||
int typlen;
|
||||
Const *temp_const;
|
||||
TargetEntry *temp_tle;
|
||||
|
||||
if (typedefault == NULL)
|
||||
if (typedefault == PointerGetDatum(NULL))
|
||||
typlen = 0;
|
||||
else
|
||||
{
|
||||
@ -319,9 +319,8 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
|
||||
|
||||
temp_const = makeConst(atttype,
|
||||
typlen,
|
||||
(Datum) typedefault,
|
||||
(typedefault == NULL),
|
||||
/* XXX ? */
|
||||
typedefault,
|
||||
(typedefault == PointerGetDatum(NULL)),
|
||||
false,
|
||||
false, /* not a set */
|
||||
false);
|
||||
|
Reference in New Issue
Block a user