summaryrefslogtreecommitdiff
path: root/schema/ttrss_schema_pgsql.sql
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-04-21 05:53:19 +0100
committerAndrew Dolgov <[email protected]>2008-04-21 05:53:19 +0100
commitfc2b26a6a27d19ecbfbb2202fd35b37568c65181 (patch)
treef9123f21920265535bfab4987d8aac674bbbbe08 /schema/ttrss_schema_pgsql.sql
parentf8232151a0a4bdd430e928d742686a2330e99d68 (diff)
add workaround for psql 8.3 stricter typechecking on SUBSTRING() (refs #201)
Diffstat (limited to 'schema/ttrss_schema_pgsql.sql')
-rw-r--r--schema/ttrss_schema_pgsql.sql5
1 files changed, 4 insertions, 1 deletions
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;