pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Empty Table
5+ messages / 2 participants
[nested] [flat]
* Empty Table
@ 2007-03-29 18:25 ezequias@fastcon.com.br
2007-03-29 18:16 ` Re: Empty Table Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: ezequias@fastcon.com.br @ 2007-03-29 18:25 UTC (permalink / raw)
To: pgsql-sql
Hi list,
I have many tables with many constraints and I would like to empty all my
tables.
There is any simple way to do it ?
I have pgAdmin here but not psql.
Any help would be glad.
Regards
Ezequias
--
Ezequias Rodrigues da Rocha
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Empty Table
2007-03-29 18:25 Empty Table ezequias@fastcon.com.br
@ 2007-03-29 18:16 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2007-03-29 18:50 ` Re: Empty Table ezequias@fastcon.com.br
0 siblings, 1 reply; 5+ messages in thread
From: Rajesh Kumar Mallah @ 2007-03-29 18:16 UTC (permalink / raw)
To: ezequias@fastcon.com.br <ezequias@fastcon.com.br>; +Cc: pgsql-sql
psql> TRUNCATE TABLE <tablename>;
if you have too many tables , generate the above commands
by using a query on tables information schema table.
hope it helps.
On 3/29/07, ezequias@fastcon.com.br <ezequias@fastcon.com.br> wrote:
> Hi list,
>
> I have many tables with many constraints and I would like to empty all my
> tables.
>
> There is any simple way to do it ?
>
> I have pgAdmin here but not psql.
>
> Any help would be glad.
>
> Regards
> Ezequias
>
>
> --
> Ezequias Rodrigues da Rocha
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Empty Table
2007-03-29 18:25 Empty Table ezequias@fastcon.com.br
2007-03-29 18:16 ` Re: Empty Table Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
@ 2007-03-29 18:50 ` ezequias@fastcon.com.br
2007-03-29 19:34 ` Re: Empty Table Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: ezequias@fastcon.com.br @ 2007-03-29 18:50 UTC (permalink / raw)
To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; ezequias@fastcon.com.br <ezequias@fastcon.com.br>; +Cc: pgsql-sql
Thank you all for a so fast reply.
I did a backup PLAIN with pgAdmin and I had to delete the information of the
current database (the database I used to make the backup).
I think that's why pgAdmin does not work with plain backups on Restore.
What does occurs with the information schema when I restore from one database
with a name to other with another name ?
Regards
Ezequias
Em Thu, 29 Mar 2007 23:46:31 +0530
"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> escreveu:
>psql> TRUNCATE TABLE <tablename>;
>
>if you have too many tables , generate the above commands
>by using a query on tables information schema table.
>hope it helps.
>
>On 3/29/07, ezequias@fastcon.com.br <ezequias@fastcon.com.br> wrote:
>> Hi list,
>>
>> I have many tables with many constraints and I would like to empty all my
>> tables.
>>
>> There is any simple way to do it ?
>>
>> I have pgAdmin here but not psql.
>>
>> Any help would be glad.
>>
>> Regards
>> Ezequias
>>
>>
>> --
>> Ezequias Rodrigues da Rocha
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 4: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
--
Ezequias Rodrigues da Rocha
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Empty Table
2007-03-29 18:25 Empty Table ezequias@fastcon.com.br
2007-03-29 18:16 ` Re: Empty Table Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2007-03-29 18:50 ` Re: Empty Table ezequias@fastcon.com.br
@ 2007-03-29 19:34 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Rajesh Kumar Mallah @ 2007-03-29 19:34 UTC (permalink / raw)
To: ezequias@fastcon.com.br <ezequias@fastcon.com.br>; +Cc: pgsql-sql
I dont think i clearly understand your requirement.
Are you wanting to restore the "PLAIN" backup of a database
with a different database name ?
what do you mean "deleting information of current database ..."
I have not used pgAdmin as i prefer cmd line mostly.
eager to help, (expect my next reply aft 6 hrs , i am abt to crash now).
hope someone else helps u in meantime.
regds
On 3/30/07, ezequias@fastcon.com.br <ezequias@fastcon.com.br> wrote:
> Thank you all for a so fast reply.
>
> I did a backup PLAIN with pgAdmin and I had to delete the information of the
> current database (the database I used to make the backup).
>
> I think that's why pgAdmin does not work with plain backups on Restore.
>
> What does occurs with the information schema when I restore from one database
> with a name to other with another name ?
>
> Regards
> Ezequias
>
>
>
> Em Thu, 29 Mar 2007 23:46:31 +0530
> "Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> escreveu:
> >psql> TRUNCATE TABLE <tablename>;
> >
> >if you have too many tables , generate the above commands
> >by using a query on tables information schema table.
> >hope it helps.
> >
> >On 3/29/07, ezequias@fastcon.com.br <ezequias@fastcon.com.br> wrote:
> >> Hi list,
> >>
> >> I have many tables with many constraints and I would like to empty all my
> >> tables.
> >>
> >> There is any simple way to do it ?
> >>
> >> I have pgAdmin here but not psql.
> >>
> >> Any help would be glad.
> >>
> >> Regards
> >> Ezequias
> >>
> >>
> >> --
> >> Ezequias Rodrigues da Rocha
> >>
> >> ---------------------------(end of broadcast)---------------------------
> >> TIP 4: Have you searched our list archives?
> >>
> >> http://archives.postgresql.org
> >>
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 1: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
>
> --
> Ezequias Rodrigues da Rocha
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Empty Table
@ 2007-03-29 19:41 Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Rajesh Kumar Mallah @ 2007-03-29 19:41 UTC (permalink / raw)
To: ezequias@fastcon.com.br <ezequias@fastcon.com.br>; +Cc: pgsql-sql
> >I dont think i clearly understand your requirement.
> >
> >Are you wanting to restore the "PLAIN" backup of a database
> >with a different database name ?
> >
> Yes
Are you getting any particular error?
what platform are you in ?
> >what do you mean "deleting information of current database ..."
> >
> Clear all lines where the name of my orign database is mentioned in the .sql
> file.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2007-03-29 19:41 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-29 18:25 Empty Table ezequias@fastcon.com.br
2007-03-29 18:16 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2007-03-29 18:50 ` ezequias@fastcon.com.br
2007-03-29 19:34 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2007-03-29 19:41 Re: Empty Table Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox