Thread: Removing Comments in pg_dump

Removing Comments in pg_dump

From
"V i s h a l Kashyap @ [Sai Hertz And Control Systems]"
Date:
Dear all,

Normally when a pg_dump is done on a database schema it inserts some
comments as follows

<code>
--
-- Definition for function my_func_ay (OID = 4446535) :
--
</code>

How can these type of comments be avoided or not included  in the dump file.

Using:
PostgreSQL 7.3.4






--
Best Regards,
Vishal Kashyap
Director / Lead Developer,
Sai Hertz And Control Systems Pvt Ltd,
http://saihertz.rediffblogs.com
Jabber IM: vishalkashyap@jabber.org
ICQ :      264360076
Yahoo  IM: mailforvishal@yahoo.com
-----------------------------------------------
You yourself, as much as anybody in the entire
universe, deserve your love and affection.
- Buddha
---------------
pgsql=# select marital_status from vishals_life;

marital_status
------------------
Single not looking

1 Row(s) affected

                    ___
                   //\\\
                  ( 0_0 )
----------------o0o-----o0o---------------------


Re: Removing Comments in pg_dump

From
Bruce Momjian
Date:
They will not appear in 7.5.  The only fix until then is to use sed to
remove it.

---------------------------------------------------------------------------

V i s h a l Kashyap @ [Sai Hertz And Control Systems] wrote:
> Dear all,
>
> Normally when a pg_dump is done on a database schema it inserts some
> comments as follows
>
> <code>
> --
> -- Definition for function my_func_ay (OID = 4446535) :
> --
> </code>
>
> How can these type of comments be avoided or not included  in the dump file.
>
> Using:
> PostgreSQL 7.3.4
>
>
>
>
>
>
> --
> Best Regards,
> Vishal Kashyap
> Director / Lead Developer,
> Sai Hertz And Control Systems Pvt Ltd,
> http://saihertz.rediffblogs.com
> Jabber IM: vishalkashyap@jabber.org
> ICQ :      264360076
> Yahoo  IM: mailforvishal@yahoo.com
> -----------------------------------------------
> You yourself, as much as anybody in the entire
> universe, deserve your love and affection.
> - Buddha
> ---------------
> pgsql=# select marital_status from vishals_life;
>
> marital_status
> ------------------
> Single not looking
>
> 1 Row(s) affected
>
>                     ___
>                    //\\\
>                   ( 0_0 )
> ----------------o0o-----o0o---------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073