Re: Feature request: include script file into function body - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: Feature request: include script file into function body
Date
Msg-id 4D4807EF020000250003A112@gw.wicourts.gov
Whole thread Raw
In response to Re: Feature request: include script file into function body  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Feature request: include script file into function body  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> The usual procedure is to put the whole CREATE FUNCTION statement
> into a file, which you can then send with \i.  I'm not quite
> seeing the point of having just the body in a file?  It's not like
> the body is typically useful to run as standalone code.

The OP mentioned text highlighting, which has bothered me at times
-- the whole body of the function is highlighted as a string
literal, at least in Kate, which I use heavily.  (Don't laugh *too*
hard.)

I haven't ever wanted to test script functions outside of PostgreSQL
before bringing them in, but it seems at least within the realm of
possibility that someone might have functional code with doesn't
directly access the database they would like to share with outside
processes or test outside before bringing in.

-Kevin

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Feature request: include script file into function body
Next
From: Tom Lane
Date:
Subject: Re: Feature request: include script file into function body