Re: [BUGS] issue with C functions using pg_dump

Поиск
Список
Период
Сортировка
От Cédric Prin-Derre
Тема Re: [BUGS] issue with C functions using pg_dump
Дата
Msg-id 59a1e754.45b01c0a.8eb03.66cc@mx.google.com
обсуждение исходный текст
Ответ на Re: [BUGS] issue with C functions using pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] issue with C functions using pg_dump
Список pgsql-bugs

Hello Tom, thanks for your quick answer,

 

i was hoping to just  get the create function code but i do not.

 

 

Here s a sample of code not generated :

 

CREATE OR REPLACE FUNCTION public.uuid_nil()

  RETURNS uuid AS

'$libdir/uuid-ossp', 'uuid_nil'

  LANGUAGE c IMMUTABLE STRICT

  COST 1;

ALTER FUNCTION public.uuid_nil()

  OWNER TO postgres;

 

Here’s also the sql file generated with my command

(pg_dump --dbname=postgresql://postgres:xxx@127.0.0.1:5432/Adventureworks

--no-owner --format=plain --schema=public  --file="D:\public.sql")

 

 

Regards,

 

Provenance : Courrier pour Windows 10

 

De : Tom Lane
Envoyé le :samedi 26 août 2017 21:36
À : Cédric Prin-Derre
Cc : pgsql-bugs@postgresql.org
Objet :Re: [BUGS] issue with C functions using pg_dump

 

Cédric Prin-Derre <prinderr@gmail.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@127.0.0.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

 


Garanti sans virus. www.avast.com
Вложения

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] issue with C functions using pg_dump
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] issue with C functions using pg_dump