125 reputation
3
bio website
location
age
visits member for 1 year, 10 months
seen Jan 23 '13 at 2:44

Jun
17
awarded  Popular Question
Jan
21
accepted ERROR: could not find array type for datatype information_schema.sql_identifier
Jan
17
awarded  Scholar
Jan
17
accepted Save output from multiple SQL SELECT commands to a file
Jan
17
comment Save output from multiple SQL SELECT commands to a file
The above will only work if the fields returned from the tables are indentical both in name and number of fields. Is it possible to run multiple SQL selects against tables with different structures, append the results of each of these queries to the same variable and then at the end output the contents of this variable to a text file?
Jan
16
asked Save output from multiple SQL SELECT commands to a file
Jan
16
comment ERROR: could not find array type for datatype information_schema.sql_identifier
Actually I don't want to know whether column names between two table share the same name. In fact know that they both contain the same names, type and are in the idential order. I want to be able to list all the fields within each table without having to hard code them in. Example: select * from gis_field_configuration_stage where ARRAY(SELECT column_name FROM information_schema.columns WHERE table_name ='gis_field_configuration_stage') not in (select ARRAY(SELECT column_name FROM information_schema.columns WHERE table_name ='gis_field_configuration') from gis_field_configuration)
Jan
15
comment ERROR: could not find array type for datatype information_schema.sql_identifier
I am aware of that but I don't want to hardcode the field names since I will be looping through a lot of different table with different structures
Jan
15
comment ERROR: could not find array type for datatype information_schema.sql_identifier
I wanted to limit the confusion by not listing my entire sql command but the below sql is what I ultimately want to run. I want to compare all the fields for each record from 1 table to another to look for data difference between the tables so I am combining all the fields within each record: select * from gis_field_configuration_stage where ARRAY(SELECT column_name FROM information_schema.columns WHERE table_name ='gis_field_configuration_stage') not in (select ARRAY(SELECT column_name FROM information_schema.columns WHERE table_name ='gis_field_configuration') from gis_field_configuration)
Jan
15
asked ERROR: could not find array type for datatype information_schema.sql_identifier
Jan
13
awarded  Student
Jan
13
asked Comparing table structure and contents using pg_dump output from two different databases