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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to