Re: Problem reloading regression database

Поиск
Список
Период
Сортировка
От Brent Verner
Тема Re: Problem reloading regression database
Дата
Msg-id 20020113214206.GA2257@rcfile.org
обсуждение исходный текст
Ответ на Re: Problem reloading regression database  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Problem reloading regression database
Список pgsql-hackers
[2002-01-13 15:17] Tom Lane said:
| Brent Verner <brent@rcfile.org> writes:
| > I fixed this by making an int* mapping from specified collist 
| > position to actual rd_att->attrs position.
| 
| Sounds better.
| 
| > I'm still a bit^W^W lost as hell on how the column default magic 
| > happens.
| 
| I'd say use build_column_default() in src/backend/optimizer/prep/preptlist.c
| to set up a default expression (possibly just NULL) for every column
| that's not supplied by the input.  That routine's not exported now, but
| it could be, or perhaps it should be moved somewhere else.  (Suggestions
| anyone?  Someplace in src/backend/catalog might be a more appropriate
| place for it.)

gotcha.

| Then in the per-tuple loop you use ExecEvalExpr, or more likely
| ExecEvalExprSwitchContext, to execute the default expressions.
| The econtext wanted by ExecEvalExpr can be had from the estate
| that CopyFrom already creates; use GetPerTupleExprContext(estate).

many, many thanks!

| You'll need to verify that you have got the memory context business
| right, ie, no memory leak across rows.  I think the above sketch is
| sufficient, but check it with a memory-eating default expression
| evaluated for a few million input rows ... 

Yes, the above info should get me through.

| and you are doing your
| testing with --enable-cassert, I trust, to catch any dangling pointers.

<ducks>
I am now :-o

thank you. brent

-- 
"Develop your talent, man, and leave the world something. Records are 
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing."  -- Duane Allman


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Matthew Kirkwood
Дата:
Сообщение: Re: mysql-pgsql comparison
Следующее
От: Justin Clift
Дата:
Сообщение: Re: mysql-pgsql comparison