Re: how to add a new column in pg_proc table

Поиск
Список
Период
Сортировка
От noman naeem
Тема Re: how to add a new column in pg_proc table
Дата
Msg-id 20050125181211.59335.qmail@web41529.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: how to add a new column in pg_proc table  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: how to add a new column in pg_proc table  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom,
Thanks for the reply I rechanged the
pg_proc.h,pg_attribute.h and pg_class.h but still
facing errors,rather this time there were two
different errors.

They came at the time of frmgrtab.h file creation,they
are

fmgrtab.c:25: error: syntax error before '-' token
fmgrtab.c:2168: error: syntax error before '}' token

there are loads and loads of such errors.

what do u say....

Could you tell me from where I can have the last patch
that added a field to pg_proc for
guidelines of which you suggested.

awaiting for reply.....

Thanks,
Nauman


--- Tom Lane <tgl@sss.pgh.pa.us> wrote:

> noman naeem <doublevision_17@yahoo.com> writes:
> > I keep on getting errors.It be very helpful if
> some
> > one can guide me regarding the basic steps for
> adding
> > a column in the pg_proc table...
> 
> The odds are that you didn't correctly update either
> pg_proc.h itself,
> the preset pg_attribute rows for it in
> pg_attribute.h (both versions!),
> or you just forgot to adjust the
> number-of-attributes for pg_proc in
> pg_class.h.
> 
> In pg_proc.h, remember that you have to fix the
> struct declaration,
> the #defines for attribute numbers, plus adjust all
> the built-in entries
> (that last is a *real* PITA...)
> 
> Not to mention adjust code that uses or updates
> pg_proc, particularly
> catalog/pg_proc.c.
> 
> One other nonobvious gotcha is that varlength fields
> must be physically
> positioned after all fixed-width fields, because the
> C code tends to
> assume that it can get at fixed-width fields by
> struct overlay.
> 
> I'd suggest looking at the last patch that added a
> field to pg_proc for
> guidelines and to make sure you did not miss
> anything:
> 
> 2004-01-06 18:55  tgl
> 
>     * doc/src/sgml/catalogs.sgml,
> src/backend/bootstrap/bootstrap.c,
>     src/backend/catalog/pg_aggregate.c,
> src/backend/catalog/pg_proc.c,
>     src/backend/commands/functioncmds.c,
> src/backend/nodes/copyfuncs.c,
>     src/backend/nodes/equalfuncs.c,
> src/backend/parser/gram.y,
>     src/backend/utils/adt/sets.c,
> src/backend/utils/fmgr/fmgr.c,
>     src/include/catalog/catversion.h,
>     src/include/catalog/pg_attribute.h,
> src/include/catalog/pg_class.h,
>     src/include/catalog/pg_proc.h,
> src/include/nodes/nodes.h,
>     src/include/nodes/parsenodes.h,
> src/pl/plperl/plperl.c,
>     src/pl/plpgsql/src/pl_comp.c,
> src/pl/plpython/plpython.c,
>     src/pl/tcl/pltcl.c: Apply the core parts of Dennis
> Bjorklund's
>     patch to allow function parameters to be declared
> with names. 
>     pg_proc has a column to store names, and CREATE
> FUNCTION can insert
>     data into it, but that's all as yet.  I need to do
> more work on the
>     pg_dump and plpgsql portions of the patch before
> committing those,
>     but I thought I'd get the bulky changes in before
> the tree drifts
>     under me.  initdb forced due to pg_proc change.
> 
>             regards, tom lane
> 


    
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Heads up: upcoming releases in all branches back to 7.2
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: bug w/ cursors and savepoints