Hi there. New pgAdmin user hoping someone out there might help me figure out why I can’t export a particular report. I’ve been running a few basic SQL scrips in pgAdmin pre 1.5 successfully and had no trouble exporting them as CSV files. Until one report, which is a bit larger than
the others (the results include about 300 rows and 8 columns). The report runs fine, but I can’t export it to save my life. We did upgrade me to 3.1, which is at least allowing me to copy the results and paste them into Excel. But I’d still love to figure
out why I can’t export as I can with others. I read a bit about this perhaps being a bug in early versions that was resolved, but since I’m now on the latest version and seeing the same thing, either the bug wasn’t
resolved or it’s not the same problem. The export process seems to work, but the resulting file is only about 1KB and contains 1 of 2 possible statements, depending on whether or not I commented out some
info about the initial drop tables. if the comments are in, I get:
if the comments are removed, I get:
The beginning of this particular report looks like this: /* Drop the temp table if it already exists */ DROP TABLE IF EXISTS tmpholds; /* This is query is run first and create the temp table populating with bibs or items that have holds */ CREATE TEMP TABLE tmpholds AS SELECT b.id AS "bib_id", COUNT(DISTINCT h.id) AS "hold_count", CASE WHEN COUNT(DISTINCT i.id) IS NULL THEN 0 ELSE COUNT(DISTINCT i.id) END AS "item_count", COUNT(DISTINCT ia.id) AS "avail_item_count", MAX(o1.order_count) AS "order_count", STRING_AGG(DISTINCT i.location_code, ' ' ORDER BY i.location_code desc) AS …and so on and so forth. The report RUNS fine, I just can’t export the results, and based on these statements, my best guess is that it’s about the drop table or the comments about the drop
table (though I’ve tried removing the comments). Anybody know if this is part of a current bug or if it can be worked around? Many thanks for your help! ________________________________________________________
|