Re: Some questions on user defined types and functions.

From: JanWieck(at)t-online(dot)de (Jan Wieck)
To: Jeffery Collins <collins(at)onyx-technologies(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Some questions on user defined types and functions.
Date: 2000-07-26 19:17:15
Message-ID: 200007261917.VAA24994@hot.jw.home
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Jeffery Collins wrote:
> I was wondering if anyone could help me with the following questions.
> They are all related to user defined types and functions.
>
> 1. Environment variables in function pathname. We would like to
> [...]

Create your SQL scripts that define the functions in a make
step, invoking sed(1) to substitute a constant string with
the content of an environment variable. This worked for the
past 20 years and I'm sure it's extremely portable.

> 2. tid assignment - We make extensive use of user defined types.
> One, fairly painful, thing we have noticed is the following sequence
> really doesn't work very well:
>
> [...]
>
> The reason for possibly wanting to do this is to fix a problem
> with the implementation of the type mytype.

You don't need to DROP and reCREATE the functions and type if
you just fixed some bug in the C coding. Recompile it,
replace the shared object and reconnect to the database. The
new backend (you get at reconnect) will load in the new
shared module and use the new code.

> 3. fid assignment - Basically the same question as above but with
> functions instead of types. If there is an index that uses a function,
> it appears that you can't drop and re-create the function without
> blowing away the index definition.

Same as 2.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2000-07-26 19:31:12 Re: function language type?
Previous Message Joel Burton 2000-07-26 18:35:35 PostgreSQL + Microsoft Access FAQ Draft Announcement

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2000-07-26 19:51:34 Re: Re: [GENERAL] Is Pg 7.0.x's Locking Mechanism BROKEN?
Previous Message Patrick Welche 2000-07-26 16:03:08 Re: Installation Report for powerpc-apple-netbsdelf1.5