Re: table creation using backend functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: table creation using backend functions
Date
Msg-id 24206.1051221376@sss.pgh.pa.us
Whole thread Raw
In response to table creation using backend functions  (Alice Lottini <alice_lottini@yahoo.it>)
List pgsql-hackers
Alice Lottini <alice_lottini@yahoo.it> writes:
> /* DUMMY_TUPLE is a tuple of our newly-defined type
> (whose creation is successful) */
> tupdesc=RelationNameGetTupleDesc(DUMMY_TUPLE);
> ...
> reloid=heap_create_with_catalog(namestring,relnamespace,tupdesc,RELKIND_RELATION,false,allowSystemTableMods);

I have a vague recollection that heap_create_with_catalog modifies the
passed-in tupdesc.  You may need to copy the tupdesc rather than just
passing the one that belongs to the DUMMY_TUPLE relation.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: query optimization scenarios 17,701 times faster!!!
Next
From: Sailesh Krishnamurthy
Date:
Subject: Re: Are we losing momentum?