analyze.c - Mailing list pgsql-hackers

From Anja Klein
Subject analyze.c
Date
Msg-id 1166212501@web.de
Whole thread Raw
Responses Re: analyze.c
List pgsql-hackers
Hi guys,

during my study i have to du some practical work. i must extend postgresql with some sampling algorithms. therefore i
implementedsome 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.
selectdby 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
TABLEtmp_pg_description (objoid oid, classname name, objsuboid int4,  description text)          WITHOUT OIDS;
COPYtmp_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



pgsql-hackers by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: [pgsql-hackers-win32] Weird new time zone
Next
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: Point in Time Recovery