analyze.c

From: "Anja Klein" <Kruemelmonster_81(at)web(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: analyze.c
Date: 2004-07-16 09:41:59
Message-ID: 1166212501@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi guys,

during my study i have to du some practical work. i must extend postgresql with some sampling algorithms. therefore i implemented some trigger functions. it works fine.
but now i have to do some changes concerning the parser, particularly analyze.c . if a user sends an create table command, postgresql should create several sample tables, which will be filled wih the sample data from the original table. for the beginning, it would be enough, if two tables are created, the original one, with table name, columns etc. selectd by the user and second one, a copy with same columns etc, but another name e.g. sample.

my problem is, that the system catalogs are created at "initdb". then the following failure occurs:

loading pg_description... /usr/local/pqsql/initdb: line 837: 22348 Done (141)
(cat <<EOF
CREATE TEMP TABLE tmp_pg_description (objoid oid, classname name, objsuboid int4, description text)
WITHOUT OIDS;
COPY tmp_pg_description FROM STDIN;
EOF
cat "$POSTGRES_DESC"; cat
<<EOF
\.
INSERT INTO pg_description SELECT t.objoid, c.oid, t.objsuboid, t.description FROM tmp_pg_description t,
pg_class c WHERE c.relname = t.classname;
EOF)
22349 Segmentation fault " $PGPATH"/postgres $PGSQL_OPT template1>/dev/null

how can i tell postgres. that it should only create the sample table, when the original table to be created has the name "origin" or something like that? or that it should only act, if some user wants to create the table, not postgres itself?

thank you very much!

greetings, anja
_______________________________________________________
WEB.DE Video-Mail - Sagen Sie mehr mit bewegten Bildern
Informationen unter: http://freemail.web.de/?mc=021199

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2004-07-16 10:16:44 Re: Point in Time Recovery
Previous Message Magnus Hagander 2004-07-16 08:50:19 Re: [HACKERS] Weird new time zone