Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #40317 All Revisions ] Back to Issue ]
Summary 0040317: can't restore pg dump of a retail instance
Revision 2024-12-09 13:52 by AugustoMauch
Steps To Reproduce 0. Update a retail instance to a version including POS changest 8afc424cc7a4 [1]
1. pg_dump it
2. restore it with pg_restore
  ERROR:
   pg_restore: [archiver (db)] could not execute query: ERROR: function dateformat() does not exist
   LINE 1: SELECT to_timestamp(to_char($1, dateFormat()), dateFormat())
                                           ^
   HINT: No function matches the given name and argument types. You might need to add explicit type casts.
   QUERY: SELECT to_timestamp(to_char($1, dateFormat()), dateFormat())
   CONTEXT: PL/pgSQL function public.trunc(timestamp without time zone) line 3 at RETURN
       Command was: CREATE INDEX obpos_app_cashup_date_idx ON public.obpos_app_cashup USING btree (public.trunc(cashupdate));



[1] hg log -r 8afc424cc7a4 -p
changeset: 11001:8afc424cc7a4
user: Eduardo Argal Guibert <eduardo.argal@openbravo.com>
date: Wed Feb 27 18:43:19 2019 +0100
summary: Adds new index to OBPOS_APP_CASHUP for CASHUPDATE

diff -r ed15e5ff9b53 -r 8afc424cc7a4 src-db/database/model/tables/OBPOS_APP_CASHUP.xml
--- a/src-db/database/model/tables/OBPOS_APP_CASHUP.xml Wed Feb 27 13:18:39 2019 +0100
+++ b/src-db/database/model/tables/OBPOS_APP_CASHUP.xml Wed Feb 27 18:43:19 2019 +0100
@@ -112,6 +112,9 @@
       <foreign-key foreignTable="OBPOS_APP_CASHUP" name="OBPOS_APPCASH_PARENT">
         <reference local="OBPOS_PARENT_CASHUP_ID" foreign="OBPOS_APP_CASHUP_ID"/>
       </foreign-key>
+ <index name="OBPOS_APP_CASHUP_DATE_IDX" unique="false">
+ <index-column name="functionBasedColumn" functionExpression="TRUNC(CASHUPDATE)"/>
+ </index>
       <index name="OBPOS_APP_CASHUP_PARENT_IDX" unique="false">
         <index-column name="OBPOS_PARENT_CASHUP_ID"/>
         <whereClause><![CDATA[OBPOS_PARENT_CASHUP_ID IS NOT NULL]]></whereClause>
Revision 2019-03-28 14:56 by AugustoMauch
Steps To Reproduce 0. Update a retail instance to a version including POS changest 8afc424cc7a4 [1]
1. pg_dump it
2. restore it with pg_restore

  ERROR:
   pg_restore: [archiver (db)] could not execute query: ERROR: function dateformat() does not exist
   LINE 1: SELECT to_timestamp(to_char($1, dateFormat()), dateFormat())
                                           ^
   HINT: No function matches the given name and argument types. You might need to add explicit type casts.
   QUERY: SELECT to_timestamp(to_char($1, dateFormat()), dateFormat())
   CONTEXT: PL/pgSQL function public.trunc(timestamp without time zone) line 3 at RETURN
       Command was: CREATE INDEX obpos_app_cashup_date_idx ON public.obpos_app_cashup USING btree (public.trunc(cashupdate));



[1] hg log -r 8afc424cc7a4 -p
changeset: 11001:8afc424cc7a4
user: Eduardo Argal Guibert <eduardo.argal@openbravo.com>
date: Wed Feb 27 18:43:19 2019 +0100
summary: Adds new index to OBPOS_APP_CASHUP for CASHUPDATE

diff -r ed15e5ff9b53 -r 8afc424cc7a4 src-db/database/model/tables/OBPOS_APP_CASHUP.xml
--- a/src-db/database/model/tables/OBPOS_APP_CASHUP.xml Wed Feb 27 13:18:39 2019 +0100
+++ b/src-db/database/model/tables/OBPOS_APP_CASHUP.xml Wed Feb 27 18:43:19 2019 +0100
@@ -112,6 +112,9 @@
       <foreign-key foreignTable="OBPOS_APP_CASHUP" name="OBPOS_APPCASH_PARENT">
         <reference local="OBPOS_PARENT_CASHUP_ID" foreign="OBPOS_APP_CASHUP_ID"/>
       </foreign-key>
+ <index name="OBPOS_APP_CASHUP_DATE_IDX" unique="false">
+ <index-column name="functionBasedColumn" functionExpression="TRUNC(CASHUPDATE)"/>
+ </index>
       <index name="OBPOS_APP_CASHUP_PARENT_IDX" unique="false">
         <index-column name="OBPOS_PARENT_CASHUP_ID"/>
         <whereClause><![CDATA[OBPOS_PARENT_CASHUP_ID IS NOT NULL]]></whereClause>


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker