Re: Generating TRUNCATE orders

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Laurent ROCHE" <laurent_roche(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Generating TRUNCATE orders
Date: 2007-10-03 17:19:35
Message-ID: dcc563d10710031019w341964demd76a854f7a946a37@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/3/07, Laurent ROCHE <laurent_roche(at)yahoo(dot)com> wrote:

Would this work:

SELECT
'TRUNCATE TABLE ' ||
'my_schema.' ||
c.relname ||', '
FROM pg_namespace nc, pg_class c
WHERE c.relnamespace = nc.oid
AND c.relkind IN ('r' )
AND nc.nspname = 'my_schema'
ORDER BY relname

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2007-10-03 17:29:04 Re: Easier string concat in PL funcs?
Previous Message Richard Huxton 2007-10-03 17:11:15 Re: Generating TRUNCATE orders