From fc2b26a6a27d19ecbfbb2202fd35b37568c65181 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <fox@madoka.spb.ru>
Date: Mon, 21 Apr 2008 05:53:19 +0100
Subject: add workaround for psql 8.3 stricter typechecking on SUBSTRING()
 (refs #201)

---
 schema/ttrss_schema_pgsql.sql | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'schema/ttrss_schema_pgsql.sql')

diff --git a/schema/ttrss_schema_pgsql.sql b/schema/ttrss_schema_pgsql.sql
index 7ea72cd75..c35781a69 100644
--- a/schema/ttrss_schema_pgsql.sql
+++ b/schema/ttrss_schema_pgsql.sql
@@ -18,6 +18,7 @@ drop table ttrss_feed_categories;
 drop table ttrss_users;
 drop table ttrss_themes;
 drop table ttrss_sessions;
+drop function SUBSTRING_FOR_DATE(timestamp, int, int);
 
 begin;
 
@@ -184,7 +185,7 @@ create index ttrss_tags_owner_uid_index on ttrss_tags(owner_uid);
 
 create table ttrss_version (schema_version int not null);
 
-insert into ttrss_version values (34);
+insert into ttrss_version values (35);
 
 create table ttrss_enclosures (id serial not null primary key,
 	content_url text not null,
@@ -317,4 +318,6 @@ create table ttrss_sessions (id varchar(250) unique not null primary key,
 
 create index ttrss_sessions_expire_index on ttrss_sessions(expire);
 
+create function SUBSTRING_FOR_DATE(timestamp, int, int) RETURNS text AS 'SELECT SUBSTRING(CAST($1 AS text), $2, $3)' LANGUAGE 'sql';
+
 commit;
-- 
cgit v1.2.3

