patchPSPP - Patches: patch #10535, Add support for either TYPE=ODBC...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10535: Add support for either TYPE=ODBC or TYPE=PSQL in windows 10

Submitter:  roger <rogerjdeangelis>
Submitted:  Thu 24 Jul 2025 03:18:53 PM UTC
   
 
Category:  None Item Group:  None
Status:  None Assigned to:  None
Open/Closed:  Open

Discussion

Thu 24 Jul 2025 03:18:53 PM UTC, original submission:  

Works well with csv but not psql or odbc on windows. I tried to compile with missing libraries but it failed.
There seems to be an issue reading from an existing postgres database.

TIA Roger

-email is unavailable-
 

GET DATA
  /TYPE=PSQL
  /CONNECT='host=localhost dbname=postgres user=postgres'
  /SQL='SELECT * FROM have';

error: Support for reading postgres databases was not compiled into this
installation of PSPP





This works
DATA LIST FIXED / qry 1-80 (A).

BEGIN DATA
drop table if exists sqlhav;
drop table if exists want;
\dt
create
 table sqlhav
    (NAME TEXT,SEX TEXT,AGE REAL,WEIGHT REAL);
\copy sqlhav from 'd:/csv/have.csv' delimiter ',' csv header;
\dt
create
   table want as
select
   sex
  ,avg(age)    as avgage
  ,avg(weight) as avgwgt
from
   sqlhav
group
    by sex
;
\dt
\copy want TO 'd:/csv/wantout.csv' CSV HEADER;
END DATA.

LIST.
SAVE TRANSLATE
  /OUTFILE='c:/temp/output.sql'
  /TYPE=TAB
  /REPLACE.

HOST COMMAND=['psql -U postgres -d template1 -f c:/temp/output.sql'].

GET DATA
  /TYPE=TXT
  /FILE='d:/csv/wantout.csv'
  /DELCASE=LINE
  /DELIMITERS=","
  /QUALIFIER='"'
  /ARRANGEMENT=DELIMITED
  /FIRSTCASE=2
  /VARIABLES=SEX A1 AVEAGE F8.2 AVGWGT F8.2.
EXECUTE.
SAVE OUTFILE='d:/sav/want.sav'.
LIST.

roger <rogerjdeangelis>

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by rogerjdeangelis (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-a7ba.
    Corresponding source code