--_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 another table.<BR> create
=
table ext_table (like table_name); ------------------> this doesnot
work=
for external tables.<BR>
<BR>
<FONT color=3D#0000ff>try - create table ext_table (like
pg_catalog.table_n=
ame); - it worked for me.</FONT><BR>
<BR>
<BR>
<BR>2) so i need to query catalog to get definition of the
tabl=
e.<BR> on the basis of this definition i can create
exte=
rnal table .<BR>eg: i am looking for some thing like :<BR><BR>
=
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_--


|