python - be: Override linecache.updatecache to allow access to

Поиск
Список
Период
Сортировка
От jwp@pgfoundry.org (James William Pye)
Тема python - be: Override linecache.updatecache to allow access to
Дата
Msg-id 20050419051953.30E2A1FB6224@pgfoundry.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
Override linecache.updatecache to allow access to procedures.

This gives traceback.print_tb the ability to read pg_proc->prosrc by looking up
the proc entry if the filename is a single, base-10 number that strtol can take.
If an invalid Oid, fallback on the old function that we hold a reference for.

Change tbtostr to rely on traceback.print_tb instead of format_tb and concat'ing
the traceback string up ourselves. This now puts a dependency on cStringIO that
is distributed with Python(might need to change how's it's used, tho =\).

Spin off transform from compile as it's used in two places now, for validation
and for giving the source to linecache, as the hard coded line information in
the code object will cause referenced lines to be off by +1.

Use format_procedure for the function name; giving a more useful represention of
the function name in the traceback and anything that would reference it in the
code object.

Put _init in a critical section to cause FATALs.

Delete the Savepoint type from module as it was just a base type for a
Postgres.Transaction's Savepoint; inappropriate for the PL context.

Modified Files:
--------------
    be/src:
        pl.c (r1.6 -> r1.7)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/python/be/src/pl.c.diff?r1=1.6&r2=1.7)

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

Предыдущее
От: momjian@svr1.postgresql.org (Bruce Momjian)
Дата:
Сообщение: pgsql: >>>>Luckily, PG 8 is available for this.
Следующее
От: teodor@svr1.postgresql.org (Teodor Sigaev)
Дата:
Сообщение: pgsql: Add comment about permissions on pg_ts* tables