[open-ils-commits] r1268 - conifer/branches/rel_1_6_1/src/sql/Pg (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 18 14:38:42 EDT 2011
Author: dbs
Date: 2011-03-18 14:38:38 -0400 (Fri, 18 Mar 2011)
New Revision: 1268
Modified:
conifer/branches/rel_1_6_1/src/sql/Pg/solr.sql
Log:
Use RETURNS SETOF record and OUT params to support older PostgreSQL
Specifically, PostgreSQL 8.3 doesn't have RETURNS TABLE support. Waah.
Modified: conifer/branches/rel_1_6_1/src/sql/Pg/solr.sql
===================================================================
--- conifer/branches/rel_1_6_1/src/sql/Pg/solr.sql 2011-03-18 18:30:01 UTC (rev 1267)
+++ conifer/branches/rel_1_6_1/src/sql/Pg/solr.sql 2011-03-18 18:38:38 UTC (rev 1268)
@@ -114,8 +114,14 @@
GRANT SELECT ON TABLE solr.bib_updates TO solr;
GRANT SELECT ON TABLE biblio.record_entry TO solr;
-CREATE OR REPLACE FUNCTION solr.bib_updates_by_lib (since TIMESTAMP, libs INT[])
- RETURNS TABLE (record BIGINT, touch_type TEXT, touched TIMESTAMP) AS
+CREATE OR REPLACE FUNCTION solr.bib_updates_by_lib (
+ since TIMESTAMP,
+ libs INT[],
+ OUT record BIGINT,
+ OUT touch_type TEXT,
+ OUT touched TIMESTAMP
+)
+ RETURNS SETOF record AS
$bibs_by_lib$
SELECT DISTINCT bre.id, bre.marc, sbu.touched
FROM biblio.record_entry bre
More information about the open-ils-commits
mailing list