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 > Re: How do i ge...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 4898 of 5419
Post > Topic >>

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

by aroravishal22@[EMAIL PROTECTED] (Vishal Arora) Apr 10, 2008 at 09:36 AM

--_42346998-9f4d-47eb-849a-8c318807eec1_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable






To: pgsql-admin@[EMAIL PROTECTED]
 Wed, 9 Apr 2008 08:50:44 -0500Subject:
=
[ADMIN] How do i get DDL of a Table from system catalog ?From:
spotluri@[EMAIL PROTECTED]
 do i get DDL of a Table from system catalog ?Purpose
:=
1) i need to create an external table on the basis of  another table.    
c=
reate table ext_table (like table_name); ------------------> this doesnot
w=
ork for external tables.
=20
try - create table ext_table (like pg_catalog.table_name); - it worked for
=
me.
=20
=20
2)  so i need to query catalog to get  definition of the table.     on the
=
basis of this definition i can create external table .eg: i am looking for
=
some thing like :   select * from pg_catalog where table_name=3D'
srikanth_=
ext_parallel_crt_sms_logs_child_depth_1_d_2008_03_30_daily ' ;3) once i
get=
 the definition of the table , i need to use that definition for creation
o=
f external table in a script which will run in cron job daily for data
load=
ing.Can anyone guide/help me in this ?Regards, Srikanth k Potluri +63
91774=
44783(philippines)=20
_________________________________________________________________
Technology : Catch up on updates on the latest Gadgets, Reviews, Gaming
and=
 Tips to use technology etc.
http://computing.in.msn.com/=

--_42346998-9f4d-47eb-849a-8c318807eec1_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
..hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class=3D'hmmessage'><BR><BR><BR><BR>
<BLOCKQUOTE>

<HR id=3DEC_stopSpelling>
<BR>
To: pgsql-admin@[EMAIL PROTECTED]
>Date: Wed, 9 Apr 2008 08:50:44
-0500<BR>S=
ubject: [ADMIN] How do i get DDL of a Table from system catalog ?<BR>From:
=
spotluri@[EMAIL PROTECTED]
><BR>Hi,<BR><BR>How do i get DDL of a Table
fr=
om system catalog ?<BR><BR>Purpose :<BR>1) i need to create an external
tab=
le on the basis of&nbsp; another table.<BR>&nbsp;&nbsp;&nbsp;&nbsp; create
=
table ext_table (like table_name); ------------------&gt; this doesnot
work=
 for external tables.<BR>
&nbsp;<BR>
<FONT color=3D#0000ff>try - create table ext_table (like
pg_catalog.table_n=
ame); - it worked for me.</FONT><BR>
&nbsp;<BR>
&nbsp;<BR>
<BR>2)&nbsp; so i need to query catalog to get&nbsp; definition of the
tabl=
e.<BR>&nbsp; &nbsp;&nbsp; on the basis of this definition i can create
exte=
rnal table .<BR>eg: i am looking for some thing like :<BR><BR>&nbsp;&nbsp;
=
select * from pg_catalog where table_name=3D'
srikanth_ext_parallel_crt_sms=
_logs_child_depth_1_d_2008_03_30_daily ' ;<BR><BR>3) once i get the
definit=
ion of the table , i need to use that definition for creation of external
t=
able 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
P=
otluri <BR>+63 9177444783(philippines) <BR><BR></BLOCKQUOTE><br /><hr
/>Exc=
lusive Marriage Proposals!
Find UR life partner at Shaadi.com <a
href=3D'http://ss1.richmedia.in/recur=
l.asp?pid=3D430' target=3D'_new'>Try it!</a></body>
</html>=

--_42346998-9f4d-47eb-849a-8c318807eec1_--
 




 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
tan12V112 Tue Oct 14 10:34:26 CDT 2008.