Re: table creation using backend functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alice Lottini <alice_lottini(at)yahoo(dot)it>
Cc: PostgreSQL Mailing List Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: table creation using backend functions
Date: 2003-04-24 21:56:16
Message-ID: 24206.1051221376@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

=?iso-8859-1?q?Alice=20Lottini?= <alice_lottini(at)yahoo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sailesh Krishnamurthy 2003-04-24 22:12:47 Re: Are we losing momentum?
Previous Message Stephan Szabo 2003-04-24 21:52:17 Re: query optimization scenarios 17,701 times faster!!!