SPI - couple things (7.0.2)

From: "Scott Muir" <wsmuir(at)islandnet(dot)com>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: SPI - couple things (7.0.2)
Date: 2001-02-23 21:23:38
Message-ID: NCBBKLMCJOGCLFHOFECNAEAGDLAA.wsmuir@islandnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Last night, I attempted to access the data of several TEXT parameters into a
'language 'C'' function I've created and got an interesting result... on of
the strings gets a little garbled on the end... I haven't attempted to
debug it yet (isoloate the behaviour; gave up; went home) but I"m wondering
if it can be assumed that the (char *) part of the TEXT struct (VARDATA) has
been terminated at the length specified by the (VARLEN())?? part. What I'm
passing is a TEXT field containing a unix filesystem path, and there seems
to be either a couple chars added on the end, or the last couple char of the
path are unprintable type things... (possibly a backspace character at the
end?)

question #2... W.R.T. creating the function stub in a database,

CREATE FUNCTION test_func (text) returns int4 as
'/usr/local/pgsql/cfunc.so', 'cfunc' LANGUAGE 'C';

pg_dump doesn't seem to include the extra 'cfunc' in the output of this
line... this is an annoyance as everytime i use pgdump to move the database
over to another machine, i have to edit this back in before sucking it in
through psql.
so the question is, "what's up with this?" 8)

thanks
Scott.

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Wasem Peter 2001-02-23 21:26:48 ODBC examples for UNIX (Linux)
Previous Message Bob Kline 2001-02-23 20:49:32 Re: unable to find postgresql.jar