Thread: SQL extension

SQL extension

From
Cyrille Gautard
Date:
Hello,

I have a postgresql database and it might be update with a xml file. I
want to write an extension to SQL (the function update_from_xml) which
be call in a client program. The xml file will not be passed as a
postgresql argument to the function because it is an external file.

How can I do to get rid of this problem ? If it's not possible, do you
have another solution ?

Thanks

Cyrille Gautard



Re: SQL extension

From
Richard Huxton
Date:
On Monday 29 March 2004 14:17, Cyrille Gautard wrote:
> Hello,
>
> I have a postgresql database and it might be update with a xml file. I
> want to write an extension to SQL (the function update_from_xml) which
> be call in a client program. The xml file will not be passed as a
> postgresql argument to the function because it is an external file.
>
> How can I do to get rid of this problem ? If it's not possible, do you
> have another solution ?

You perhaps want to look at the large-object support in PG.

However, if the xml file is not readable by the database backend you are going
to have to pass it through the client anyway.

PS - there is some xml-related stuff in the contrib/ directory of the source
distribution. Don't know if any of it is of use to you.

--
  Richard Huxton
  Archonet Ltd