dbTalk Databases Forums  

Column Data Type

comp.databases.postgresql comp.databases.postgresql


Discuss Column Data Type in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan
 
Posts: n/a

Default Column Data Type - 02-04-2008 , 04:35 PM






Hi,

I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.

Any help with this would be appreciated.

Thanks,
Daniel

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM






Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #6  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #7  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #8  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
  #9  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: Column Data Type - 02-26-2008 , 09:24 AM



Dan <power919 (AT) gmail (DOT) com> wrote:
Quote:
I looking for a way to dynamically find the data type of a column in
table1, so I can then dynamically add a column in table2 of the same
data type.
The view information_schema.columns contains the data_type of all
columns in your database that you can access.

See the documentation in
http://www.postgresql.org/docs/curre...a-columns.html

Does that help you?

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.