hawq-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Krieger <GKrie...@mrpg.com>
Subject Unable to copy values from information_schema.columns to public schema
Date Tue, 14 Nov 2017 09:52:21 GMT
Hi All,

I am battling to copy data from certain views in the information schema to public in Hawq
2.2.0.0

See below

CREATE DATABASE "test"
                WITH TEMPLATE = template1


CREATE TABLE public.testtable  (
                testid                    int4 NULL,
                testcode              varchar(5) NULL,
                testdesc               varchar(30) NULL
                )
DISTRIBUTED RANDOMLY

select column_name from information_schema.columns
where column_name = 'testcode'
-- = 1 record


create table public.newtable
as
select column_name from information_schema.columns
where column_name = 'testcode'


select * from public.newtable
-- 0 records

I am unable to get the newly created tables column from information_schema.columns to my new
table. This seems to be the same problem on other views and tables. I also cannot join. It
seems I am able to get the preloaded objects copied just not the ones I create.

Any ideas on what I am doing wrong? I am using gpadmin to test

I also tried the following from the actual table with no luck


select * from pg_attribute
where attname = 'testcode'
-- 1 record

create table test1
as
select * from pg_attribute
where attname = 'testcode'

select * from test1
-- 0 records


Thanks

Grant




T:  
E:  
W:  http://www.mrpricegroup.com

The information contained in this communication from @|from|email|@ is confidential and may
be legally privileged. This email  is intended solely for use by the addressee and others
authorized to receive it, and should not be read if delivered in error. If you are not the
addressee you are hereby notified that any disclosure, copying, distribution or action taken
or omitted  in reliance of the contents of this information is strictly prohibited and may
be unlawful. Please notify the sender immediately if the e-mail has unintentionally reached
you. The email legal notice that governs the transmission of this electronic communication
is available online at Mr Price Group Limited (http://www.mrpricegroup.com/LegalNotice.aspx).
If you cannot access the legal notice, kindly  contact us on  +27 800 21 2535 and a copy will
be provided to you.
Mr Price Group is an Authorised Financial Services and Credit Provider: FSP31450 and NCRCP46.

Please consider the environment before printing this email.




Mime
View raw message