Skip site navigation (1) Skip section navigation (2)

Re: Insert ... (a, b, DEFAULT, c, d);

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Insert ... (a, b, DEFAULT, c, d);
Date: 2002-03-30 19:06:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Rod Taylor <rbt(at)zort(dot)ca> writes:
> Adds inserts with defaults.

A few gripes about this ---

* You can't simply invent a node type without creating any support code
for it.  See backend/nodes/.  copyfuncs and equalfuncs are *required*
functionality; infuncs/outfuncs are somewhat more negotiable.  For a
node type that never gets past parse analysis it's okay to omit infuncs,
and you can get away with omitting outfuncs too.

* I find it really ugly (not to say fragile) to overload resjunk with
this meaning.  The best solution would be to restructure the calling
conventions for transformTargetList to fix the problem of not being able
to access all the lists that need to be updated.  Failing that, my
inclination would be to pass back the unaltered InsertDefault node
(instead of a Resdom) as part of transformTargetList's result list; then
an IsA test in transformInsertStmt would work to detect which entries
are real.

			regards, tom lane

In response to


pgsql-patches by date

Next:From: Tom LaneDate: 2002-03-30 20:20:36
Subject: Re: ALT*R T*BL* S*T / DR*P N*T N*LL patch - 4th try
Previous:From: Rod TaylorDate: 2002-03-30 03:07:10
Subject: Insert ... (a, b, DEFAULT, c, d);

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group