我正在尝试将我在本地开发的数据库上传到我们的开发服务器中.
我在我的机器上安装了PostgreSQL 9.1,开发服务器使用8.4.
尝试使用9.1创建的转储文件将数据库恢复到8.4时,我收到错误:
pg_restore: [archiver (db)] could not execute query: ERROR: syntax error at or near "EXTENSION"
LINE 1: CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalo...
Run Code Online (Sandbox Code Playgroud)
并且快速研究告诉我在9.1之前不存在"扩展".
我不确定我应该在pg_dump中寻找一个忽略"扩展"的选项,因为我试图上传的数据库依赖于大多数数据的PostGIS扩展.
虽然升级开发服务器并在开发服务器中安装PostGIS是一个选项,但我想知道一个不同的路由,其中我不需要在服务器上编辑任何内容,同时保持我开发的数据库的功能.
当然其他的变通方法受到欢迎,我将数据库上传到服务器的唯一目的是减少每当我需要为我们的团队部署一些东西时我必须对项目进行的重新配置.
这个似乎是一个简单的问题.当我尝试在eclipse中运行或编译我的maven项目时,我收到错误:
SEVERE: Servlet /articleservices threw load() exception
org.xml.sax.SAXParseException; lineNumber: 73; columnNumber: 32; The prefix "p" for attribute "p:name" associated with an element type "bean" is not bound.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)..
Run Code Online (Sandbox Code Playgroud)
注意我截断了错误消息,因为我相信这个根本是不言自明的......但不管我看了多少并检查,我的配置文件似乎没有任何问题,如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/cache
http://www.springframework.org/schema/cache/spring-cache.xsd">
<context:component-scan base-package="mylittlecacheproject" />
<mvc:resources mapping="/**" location="/" />
<!-- Enables the Spring MVC @Controller programming model -->
<mvc:annotation-driven />
<!-- annotation …Run Code Online (Sandbox Code Playgroud)