Re: [GENERAL] installing DBD::Pg without installing postgres

2001-04-24 Thread Jeff Duffy


On Mon, 23 Apr 2001 16:30:43 -0400, Fran Fabrizio alluded:

 
  Hello,
  
  It seems that there should be a way to install the DBD Pg module without
  having to install postgres on the local machine.  I tried installing
  just the libs rpm, but that didn't seem to do the trick.  I've done some
  usenet and mailing list archive searches, but all the info I'm turning
  up appears geared towards the assumption that you also want postgres
  installed locally.  Am I looking in the wrong places?

 There really isn't any reason to do so. If you're looking to have many
machines connect to a single PostgreSQL database, take a look at DBI::Proxy.
It is designed to allow you to connect to databases that have libraries
linked into the DBD::* executables without needing the libraries on the local
box (this is very nice for avoiding the Oracle client library installs as
well).

Jeff

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[GENERAL] Can a PL/PgSQL function return a cursor?

2001-01-13 Thread Jeff Duffy


 I have not had any luck getting a PL/PgSQL function that returns a 
cursor to compile. I've tried writing this in several forms, for 
instance;

CREATE FUNCTION getcursor() 
RETURNS cursor
AS
  'BEGIN
DECLARE testcursor CURSOR FOR
  SELECT * FROM test_table;
RETURN testcursor;
  END;'
LANGUAGE 'plpgsql';


but the parser always complains:

 ERROR:  parser: parse error at or near "cursor"

I assume this means that cursor is not a valid return type for PL/PgSQL 
functions? The point of this is to map queries that return large 
results sets to cursors for use in Java (through the ResultSet type).

 I'm using 7.0.3 on Red Hat 7.0.

Jeff



-- 
Errors have occurred.
We won't tell you where or why.
Lazy programmers.
-- Hacking haiku