You don't reproduce my problem because you don't use function for DEFAULT VALUE in TABLE. You use nextval - this works ok.
THIS IS FULL PG_DUMP FILE:
See below...
--
-- PostgreSQL database dump
--
-- Started on 2008-02-12 12:20:56
SET client_encoding = 'UTF8';
SET standard_conforming_strings...
This is part of pg_dump file:
.........
.........
.........
SET search_path = moja_schema, pg_catalog;
CREATE FUNCTION fn_sq_id_kotuc() RETURNS character varying
AS $$
DECLARE t_id VARCHAR;
BEGIN
t_id := 'KT' || LTrim( to_char( nextval( 'moja_schema.sq_id_kotuc' ), '00000000' ) )...
I did following steps:
- upgrade PostgreSQL from version 8.1.4 to 8.1.11
- pg_dump
- install version 8.3.0 on another computer
- pg_restore
It's same problem.
All fields which had as default value some function, that function don't have schema name.
for example:
BEFORE PG_DUMP:
....
"id_kotuc"...
pg_dump remove name of schema from default value.
i don't know why. how can i solve this problem ?
For example:
BEFORE PG_DUMP:
CREATE TABLE "is8"."tb_kotuce" (
"id_kotuc" CHAR(10) DEFAULT is8.fn_sq_id_kotuc() NOT NULL,
...
...
AFTER PG_RESTORE
CREATE TABLE "is8"."tb_kotuce" (...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.