Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Admin > How do i get DD...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4898 of 5124
Post > Topic >>

How do i get DDL of a Table from system catalog ?

by spotluri@[EMAIL PROTECTED] ("Potluri Srikanth") Apr 9, 2008 at 08:50 AM

<HTML>
Hi,<br>
<br>
How do i get DDL of a Table from system catalog ?<br>
<br>
Purpose :<br>
1) i need to create an external table on the basis of&nbsp; another
table.<=
br>
&nbsp;&nbsp;&nbsp;&nbsp; create table ext_table (like table_name);
--------=
----------> this doesnot work for external tables.<br>
2)&nbsp; so i need to query catalog to get&nbsp; definition of the
table.<b=
r>
&nbsp; &nbsp;&nbsp; on the basis of this definition i can create external
t=
able .<br>
eg: i am looking for some thing like :<br>
<br>
&nbsp;&nbsp; select * from pg_catalog where table_name=3D'
srikanth_ext_par=
allel_crt_sms_logs_child_depth_1_d_2008_03_30_daily ' ;<br>
<br>
3) once i get the definition of the table , i need to use that definition
f=
or creation of external table in a script which will run in cron job daily
=
for data loading.<br>
<br>
Can anyone guide/help me in this ?<br>
<br>
<br>
<br>
Regards,
<br>
Srikanth k Potluri
<br>
+63 9177444783(philippines) <BR></HTML>
 




 3 Posts in Topic:
How do i get DDL of a Table from system catalog ?
spotluri@[EMAIL PROTECTED  2008-04-09 08:50:44 
Re: How do i get DDL of a Table from system catalog ?
vka@[EMAIL PROTECTED] (&  2008-04-09 18:21:32 
Re: How do i get DDL of a Table from system catalog ?
aroravishal22@[EMAIL PROT  2008-04-10 09:36:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 17:22:10 CDT 2008.