Re: issue with C functions using pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Cédric Prin-Derre <prinderr(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: issue with C functions using pg_dump
Date: 2017-08-26 19:36:37
Message-ID: 7244.1503776197@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

=?UTF-8?B?Q8OpZHJpYyBQcmluLURlcnJl?= <prinderr(at)gmail(dot)com> writes:
> i am am doing some test using the Adventureworks sample database (available
> on postgresql wiki) and i have noticed an issue with pgdump
> pg_dump --dbname=postgresql://postgres:xxx(at)127(dot)0(dot)0(dot)1:5432/Adventureworks
> --no-owner --format=plain --schema=public --file="D:\public.sql"
> the generated sql file does not contain the code of the LANGUAGE c
> functions stored in this schema

If you're expecting it to contain the C source code, you're mistaken.
It should just be reconstructing the CREATE FUNCTION commands.
Typical output for a C-language function might be something like

CREATE FUNCTION int44in(cstring) RETURNS city_budget
LANGUAGE c IMMUTABLE STRICT
AS '$libdir/regress.so', 'int44in';

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Cédric Prin-Derre 2017-08-26 21:25:39 Re: issue with C functions using pg_dump
Previous Message Cédric Prin-Derre 2017-08-26 18:08:27 issue with C functions using pg_dump