From: | "Michael (dot)" <phifli(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Moving a database between servers |
Date: | 2003-12-10 22:59:39 |
Message-ID: | 20031210225939.23456.qmail@web80706.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am trying to move a postgresql database from one
server to another. The original server is 7.1.3, and
the new one is 7.3.4.
I went on the old and used the command:
pg_dumpall > dump
On the new:
psql -e < dump
I get this for multiple functions. (Error follows
surrounded by *****'s)
CREATE FUNCTION "transaction_visit" (integer) RETURNS
integer AS '
select visit_id
from (
select *
from visit_history as vh
where sequence = (
select max(sequence)
from visit_history
where vh.firm_id = firm_id
and vh.patient_id =
patient_id
and vh.visit_id = visit_id
)
) as v
where v.firm_id = (select firm_id from
current_transaction)
and v.patient_id = $1
and v.person_id = (select person_id from
current_transaction)
and v.inked is null
' LANGUAGE 'sql';
****ERROR: Relation "current_transaction" does not
exist****
The current_transaction is a TEMPORARY table created
like this:
CREATE FUNCTION "open_session" (integer,integer)
RETURNS integer AS '
create temporary table current_transaction as
select $1 as firm_id,
$2 as person_id,
timeofday()::timestamp as
transaction_timestamp,
timeofday()::timestamp as
history_timestamp;
select 1;
' LANGUAGE 'sql';
How do I get these functions to import correctly if it
fails due to this "current_transaction" table not
being found? (only due to it being a temporarily table
created by a different command)
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Jean-Max Reymond | 2003-12-10 23:01:18 | Re: datestyle in postgresql.conf, version 7.4 |
Previous Message | Tom Lane | 2003-12-10 22:53:56 | Re: datestyle in postgresql.conf, version 7.4 |