Juerg,

> I need to transfer a db form one to another server. I wanted to do
> this
> with pg_dumpall and psql -e ....

Have you tried just using pg_dump instead of pg_dumpall?  I understand
that there were a few bugs in pg_dumpall, and pg_dump will mean less
data to transfer.
 

> CREATE FUNCTION buildString(bpchar) RETURNS text AS '
>         DECLARE
>                 list           text;
>                 rec          record;
>         BEGIN
>         list := '''';
>           FOR rec IN SELECT z_u_umfang FROM zylinder_umfang WHERE
> z_u_typ
> = $1;
>              list := list || text(rec.z_u_umfang) || '','';
>           END LOOP;
>           RETURN list;
>         END;
> ' LANGUAGE 'plpgsql';

It would be nice to see the errors you're getting when you try to
restore.  Could it be as simple as the dump file trying to create the
view before the function?  Or plpgsql not being defined as a language on
the target server?

BTW, there is a better-performance way to do the same thing you're doing
with that function.  Please browse the list archives with a search for
'catenate' -- you'll find a discussion of custom aggregates which
concatinate strings.

-Josh



______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      [EMAIL PROTECTED]
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to