[SQL] to restore database in schema

2007-09-28 Thread Penchalaiah P.
Hi ...

Under one database who's name is postgres ,its contains 2 schema's

1)cdao1

2)cdao2.

 

I want to restore one database into schema 2.(cdao2)...here there is no
option to restore...

I can restore into one database,but I cant restore into schema...may I
know y its happening...

Any one can help me for this

 

Thanks & Regards

Penchal Reddy

 

Information transmitted by this e-mail is proprietary to Infinite Computer 
Solutions and / or its Customers and is
intended for use only by the individual or the entity to which it is addressed, 
and may contain information that is
privileged, confidential or exempt from disclosure under applicable law. If you 
are not the intended recipient or it
appears that this mail has been forwarded to you without proper authority,you 
are notified that any use or dissemin-
ation of this information in any manner is strictly prohibited.In such 
cases,please notify us immediately at 
[EMAIL PROTECTED] and delete this email from your records.


Re: [SQL] problems with copy

2007-09-28 Thread Luis Carlos Ferreira
El Lun 24 Sep 2007 21:38, chester c young escribió:
> I'm getting lots of delimited files from Excel and MySQL users that,
> mid-file, begin truncating lines if ending in null values.
> 
> for example:
> 1781: "one","two","three",,
> 1782: "one","two","three",,
> 1783: "one","two","three",,
> 
> (delimited files from Open Office are well behaved)
> 
> is there any way to handle this apparently standard aberration in PG?
>
You need to normalize the csv files filtering its contents with some script
...
...
$fields_in_table=9;
while (<>) {
 chomp;
 @f=split(",");
 for $i ( 0 .. $fields_in_table ) {
print $f[$i].",";
 };
 print "\n";
};
...
...

-- 

Luis

---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Re: [SQL] to restore database in schema

2007-09-28 Thread Richard Huxton

Penchalaiah P. wrote:

Hi ...

Under one database who's name is postgres ,its contains 2 schema's


Probably not a good idea to use the "postgres" database for casual 
usage. Any reason why you're not using a new database?



1)cdao1
2)cdao2.


OK


I want to restore one database into schema 2.(cdao2)...here there is no
option to restore...


You want to restore what database? A database can contain multiple 
schemas, so I'm not sure how you'd restore a DB "into" a schema?


Are you trying to copy schema cdao1 into cdao2?

--
  Richard Huxton
  Archonet Ltd

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq