VMS x86-64 database server

Liste des GroupesRevenir à co vms 
Sujet : VMS x86-64 database server
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vms
Date : 06. Jul 2025, 20:45:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <104ejo8$2cobv$1@dont-email.me>
User-Agent : Mozilla Thunderbird
As we all know then the available options are currently very limited.
But I just found a little trick to get one more.
:-)
$ write sys$output f$getsyi("VERSION")
V9.2-3
$ type TestPG.java
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
public class TestPG {
     public static void main(String[] args) throws Exception {
         Connection con = DriverManager.getConnection("jdbc:postgresql://localhost:5435/test", "sa", "hemmeligt");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery("SELECT f1,f2 FROM t1");
         while(rs.next()) {
             int f1 = rs.getInt(1);
             String f2 = rs.getString(2);
             System.out.println(f1 + " " + f2);
         }
         rs.close();
         stmt.close();
         con.close();
     }
}
$ javac TestPG.java
$ java -cp .:/javalib/postgresql-42_5_1.jar TestPG
1 A
2 BB
3 CCC
$ type test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <libpq-fe.h>
int main()
{
     PGconn *con = PQconnectdb("host=localhost port=5435 dbname=test user=sa password=hemmeligt");
     PGresult *res;
     res = PQprepare(con, "stmt_selectf1f2fromt1", "SELECT f1,f2 FROM t1", 0, NULL);
     PQclear(res);
     res = PQexecPrepared(con, "stmt_selectf1f2fromt1", 0, NULL, NULL, NULL, 0);
     int nrows = PQntuples(res);
     for(int i = 0; i < nrows; i++)
     {
         int f1 = atoi(PQgetvalue(res, i, 0));
         char f2[51];
         strcpy(f2, PQgetvalue(res, i, 1));
         printf("%d %s\n", f1, f2);
     }
     PQclear(res);
     PQexec(con, "DEALLOCATE stmt_selectf1f2fromt1");
     PQfinish(con);
     return 0;
}
$ cc /include=libpq$root:[include] /name=as_is test
$ link test + libpq$root:[lib]libpq/libr + libpq$root:[lib]libgpgtypes/libr + ssl111$lib:ssl111$libssl/libr + ssl111$lib:ssl111$libcrypto/libr
$ run test
1 A
2 BB
3 CCC
C:\IDEProjects\EclipsePHP\Test>type TestPDO.php
<?php
$con = new PDO('pgsql:host=arne4;port=5435;dbname=test', 'sa', 'hemmeligt');
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$con->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$stmt = $con->prepare('SELECT f1,f2 FROM t1');
$stmt->execute(array());
while($row = $stmt->fetch()) {
     $f1 = $row['f1'];
     $f2 = $row['f2'];
     echo "$f1 $f2\r\n";
}
?>
C:\IDEProjects\EclipsePHP\Test>php TestPDO.php
1 A
2 BB
3 CCC
I cannot use PHP on VMS yet as I don't have a PHP with pgsql and
pdo_pgsql. But given that libpq is ported, then those can probably
be build.
So what is happening here?
PostgreSQL on VMS x86-64????
No. Sorry.
I am using a little trick. H2 can emulate both PostgreSQL
SQL dialect and PostgreSQL network protocol.
$ type server.com
$ java -cp /javalib/h2-2_2_220.jar "org.h2.tools.Server" -tcp "-tcpAllowOthers" -pg "-pgAllowOthers" -baseDir .
$ exit
$ @server
TCP server running at tcp://192.168.68.40:9092 (others can connect)
PG server running at pg://192.168.68.40:5435 (others can connect)
:-)
Arne

Date Sujet#  Auteur
6 Jul20:45 * VMS x86-64 database server61Arne Vajhøj
6 Jul22:39 +- Re: VMS x86-64 database server1Lawrence D'Oliveiro
6 Jul23:07 +* Re: VMS x86-64 database server34Arne Vajhøj
7 Jul00:19 i`* Re: VMS x86-64 database server33Lawrence D'Oliveiro
7 Jul00:58 i `* Re: VMS x86-64 database server32Arne Vajhøj
7 Jul03:42 i  `* Re: VMS x86-64 database server31Lawrence D'Oliveiro
7 Jul19:07 i   `* Re: VMS x86-64 database server30Arne Vajhøj
7 Jul19:16 i    +* Re: VMS x86-64 database server2Arne Vajhøj
7 Jul19:21 i    i`- Re: VMS x86-64 database server1Arne Vajhøj
7 Jul23:07 i    `* Re: VMS x86-64 database server27Lawrence D'Oliveiro
8 Jul00:28 i     +* Re: VMS x86-64 database server14Arne Vajhøj
8 Jul01:26 i     i`* Re: VMS x86-64 database server13Lawrence D'Oliveiro
8 Jul13:45 i     i `* Re: VMS x86-64 database server12Arne Vajhøj
8 Jul22:57 i     i  `* Re: VMS x86-64 database server11Lawrence D'Oliveiro
8 Jul23:40 i     i   `* Re: VMS x86-64 database server10Arne Vajhøj
9 Jul00:38 i     i    `* Re: VMS x86-64 database server9Lawrence D'Oliveiro
9 Jul02:54 i     i     `* Re: VMS x86-64 database server8Arne Vajhøj
9 Jul08:25 i     i      `* Re: VMS x86-64 database server7Lawrence D'Oliveiro
9 Jul20:33 i     i       `* Re: VMS x86-64 database server6Arne Vajhøj
10 Jul00:07 i     i        `* Re: VMS x86-64 database server5Lawrence D'Oliveiro
10 Jul00:51 i     i         `* Re: VMS x86-64 database server4Arne Vajhøj
10 Jul02:21 i     i          `* Re: VMS x86-64 database server3Lawrence D'Oliveiro
10 Jul03:24 i     i           `* Re: VMS x86-64 database server2Arne Vajhøj
10 Jul05:28 i     i            `- Re: VMS x86-64 database server1Lawrence D'Oliveiro
8 Jul14:35 i     `* Re: VMS x86-64 database server12Arne Vajhøj
8 Jul22:56 i      `* Re: VMS x86-64 database server11Lawrence D'Oliveiro
8 Jul23:20 i       `* Re: VMS x86-64 database server10Arne Vajhøj
9 Jul00:37 i        `* Re: VMS x86-64 database server9Lawrence D'Oliveiro
9 Jul01:31 i         `* Re: VMS x86-64 database server8Arne Vajhøj
9 Jul08:22 i          `* Re: VMS x86-64 database server7Lawrence D'Oliveiro
10 Jul01:04 i           `* Re: VMS x86-64 database server6Arne Vajhøj
10 Jul01:25 i            +* Re: VMS x86-64 database server4Arne Vajhøj
10 Jul02:35 i            i`* Re: VMS x86-64 database server3Lawrence D'Oliveiro
10 Jul03:26 i            i `* Re: VMS x86-64 database server2Arne Vajhøj
10 Jul06:48 i            i  `- Re: VMS x86-64 database server1Lawrence D'Oliveiro
10 Jul02:33 i            `- Re: VMS x86-64 database server1Lawrence D'Oliveiro
6 Jul23:11 +- Re: VMS x86-64 database server1Arne Vajhøj
6 Jul23:39 `* Re: VMS x86-64 database server24Craig A. Berry
7 Jul00:57  `* Re: VMS x86-64 database server23Arne Vajhøj
7 Jul15:50   `* Re: VMS x86-64 database server22Mark Berryman
7 Jul19:01    `* Re: VMS x86-64 database server21Arne Vajhøj
7 Jul22:06     `* Re: VMS x86-64 database server20Mark Berryman
7 Jul22:36      +* Re: VMS x86-64 database server2Arne Vajhøj
7 Jul22:37      i`- Re: VMS x86-64 database server1Arne Vajhøj
7 Jul23:08      `* Re: VMS x86-64 database server17Lawrence D'Oliveiro
8 Jul00:21       `* Re: VMS x86-64 database server16Arne Vajhøj
8 Jul01:27        `* Re: VMS x86-64 database server15Lawrence D'Oliveiro
8 Jul12:14         `* Re: VMS x86-64 database server14Arne Vajhøj
8 Jul22:58          `* Re: VMS x86-64 database server13Lawrence D'Oliveiro
8 Jul23:14           +* Re: VMS x86-64 database server10Arne Vajhøj
9 Jul00:40           i`* Re: VMS x86-64 database server9Lawrence D'Oliveiro
9 Jul03:18           i `* Re: VMS x86-64 database server8Arne Vajhøj
9 Jul08:27           i  +- Re: VMS x86-64 database server1Lawrence D'Oliveiro
9 Jul11:16           i  `* Re: VMS x86-64 database server6hb0815
9 Jul15:13           i   `* Re: VMS x86-64 database server5Arne Vajhøj
9 Jul17:51           i    `* Re: VMS x86-64 database server4hb0815
9 Jul18:39           i     `* Re: VMS x86-64 database server3Arne Vajhøj
9 Jul18:56           i      +- Re: VMS x86-64 database server1Chris Townley
9 Jul20:55           i      `- Re: VMS x86-64 database server1hb0815
10 Jul01:12           `* Re: VMS x86-64 database server2bill
10 Jul13:00            `- Re: VMS x86-64 database server1Dan Cross

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal