Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #411925 > unrolled thread
| Started by | Charlie <pipedroner3@kismet45.org> |
|---|---|
| First post | 2017-04-28 13:18 -0400 |
| Last post | 2017-05-02 19:33 +0000 |
| Articles | 20 on this page of 167 — 16 participants |
Back to article view | Back to comp.os.linux.advocacy
Snit hitting the glue bag early today Charlie <pipedroner3@kismet45.org> - 2017-04-28 13:18 -0400
Re: Snit hitting the glue bag early today Silver Slimer <sl@im.er> - 2017-04-28 16:06 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-04-28 13:08 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 07:10 +0000
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-01 07:17 -0700
Re: Snit hitting the glue bag early today Glenn Harrison <glannharrison0@gmail.com> - 2017-05-01 16:24 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 09:38 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 21:51 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 15:14 -0700
Re: Snit hitting the glue bag early today vallor <vallor@cultnix.org> - 2017-05-01 22:53 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 16:34 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 18:00 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-01 18:35 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-02 02:23 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-02 11:26 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-02 22:12 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-03 09:22 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-03 14:07 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-04 09:29 -0400
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-04 16:42 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-04 20:06 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-04 20:12 +0000
Re: Snit hitting the glue bag early today chrisv <chrisv@nospam.invalid> - 2017-05-05 06:52 -0500
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-05 10:32 -0500
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 13:22 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 13:01 -0400
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-04 13:16 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-04 21:36 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-06 09:44 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-04 19:49 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-04 19:28 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 02:56 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-04 23:40 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 06:18 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 06:34 +0000
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-05 07:07 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 07:29 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 16:48 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 20:49 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 13:02 -0400
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-05 19:12 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-05 13:45 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 17:09 -0400
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-05 21:41 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 13:00 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-05 20:14 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-05 13:44 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 23:51 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-06 04:48 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-06 10:06 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-06 15:50 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-07 13:09 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-07 18:39 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-09 22:01 +0000
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-09 17:17 -0500
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-09 22:45 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-09 16:21 -0700
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-09 19:20 -0500
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-10 03:01 +0000
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-09 22:04 -0500
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-09 23:13 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-09 23:41 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-10 04:56 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-11 11:21 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-12 14:21 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-12 11:34 -0700
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-12 11:39 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-12 19:06 -0400
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-13 09:14 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-14 08:15 -0400
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-14 09:46 -0700
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-14 12:31 -0500
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-14 10:42 -0700
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-14 12:45 -0500
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-14 10:50 -0700
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-14 12:54 -0500
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-14 19:28 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-14 23:08 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-14 20:16 -0700
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-15 09:46 -0700
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-15 19:51 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-15 12:59 -0700
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-15 15:26 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-16 14:02 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-16 11:11 -0700
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-16 12:26 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-17 09:06 -0400
It takes me 8 Seconds to Download 999 articles ( full header and body ). Jeff-Relf.Me @. - 2017-05-19 04:24 -0700
Re: It takes me 8 Seconds to Download 999 articles ( full header and body ). tlvp <mPiOsUcB.EtLlLvEp@att.net> - 2017-05-19 23:17 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-13 16:24 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-13 13:39 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-13 18:24 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-13 23:47 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-15 11:23 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-15 20:49 +0000
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-15 21:05 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-15 17:30 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-15 22:08 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-15 19:50 -0400
Re: Snit hitting the glue bag early today vallor <vallor@cultnix.org> - 2017-05-17 21:04 +0000
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-15 17:24 -0500
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-15 18:45 -0400
Re: Snit hitting the glue bag early today Marek Novotny <marek.novotny@marspolar.com> - 2017-05-15 17:57 -0500
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-15 11:30 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-15 20:53 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-16 01:16 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-16 09:32 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-16 14:22 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-16 14:03 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-10 09:23 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-10 22:21 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-11 11:21 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-11 22:42 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-11 22:43 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-12 04:43 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-12 14:20 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-12 20:44 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-13 09:06 -0400
Re: Snit hitting the glue bag early today owl <owl@rooftop.invalid> - 2017-05-13 16:20 +0000
Re: Snit hitting the glue bag early today Chris Ahlstrom <OFeem1987@teleworm.us> - 2017-05-05 05:28 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-05 13:02 -0400
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-01 14:44 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 11:50 -0700
Re: Snit hitting the glue bag early today Steve Carroll <fretwizzer@gmail.com> - 2017-05-01 12:12 -0700
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-01 17:37 -0400
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 22:06 +0000
Re: Snit hitting the glue bag early today chrisv <chrisv@nospam.invalid> - 2017-05-02 08:08 -0500
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-02 11:26 -0400
Re: Snit hitting the glue bag early today Silver Slimer <sl@im.er> - 2017-05-02 12:25 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 09:52 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 19:39 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 14:14 -0700
Snit digest 432 / 2017-05-02 Sandman <mr@sandman.net> - 2017-05-02 21:37 +0000
Re: Snit hitting the glue bag early today "Alistair Fitzpatrick" <fitz@gmail.com> - 2017-05-03 09:32 -0400
Re: Snit hitting the glue bag early today chrisv <chrisv@nospam.invalid> - 2017-05-03 08:55 -0500
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-03 10:20 -0400
Re: Snit hitting the glue bag early today William Poaster <wp@dev.null> - 2017-05-03 15:22 +0100
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-02 10:28 -0400
Re: Snit hitting the glue bag early today Silver Slimer <sl@im.er> - 2017-05-01 19:25 -0400
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 21:50 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 08:11 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 18:06 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 11:48 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 19:20 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 12:31 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-01 21:37 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-01 15:14 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 06:28 +0000
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 06:47 +0000
Re: Snit hitting the glue bag early today vallor <vallor@cultnix.org> - 2017-05-02 06:53 +0000
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 07:10 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 09:52 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 19:37 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 14:12 -0700
Snit digest 431 / 2017-05-02 Sandman <mr@sandman.net> - 2017-05-02 21:34 +0000
Re: Snit hitting the glue bag early today DFS <nospam@dfs.com> - 2017-05-02 11:27 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 09:49 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 19:36 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 14:11 -0700
Snit digest 430 / 2017-05-02 Sandman <mr@sandman.net> - 2017-05-02 21:33 +0000
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 19:23 +0000
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 14:09 -0700
Snit digest 429 / 2017-05-02 Sandman <mr@sandman.net> - 2017-05-02 21:32 +0000
Re: Snit digest 429 / 2017-05-02 chrisv <chrisv@nospam.invalid> - 2017-05-03 07:31 -0500
Re: Snit digest 429 / 2017-05-02 Silver Slimer <sl@im.er> - 2017-05-03 10:16 -0400
Re: Snit hitting the glue bag early today Snit <usenet@gallopinginsanity.com> - 2017-05-02 09:48 -0700
Re: Snit hitting the glue bag early today Sandman <mr@sandman.net> - 2017-05-02 19:33 +0000
Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9 Next page →
| From | Marek Novotny <marek.novotny@marspolar.com> |
|---|---|
| Date | 2017-05-15 17:24 -0500 |
| Message-ID | <2vidnSP_CO0qt4fEnZ2dnUU7-c-dnZ2d@giganews.com> |
| In reply to | #414721 |
On 2017-05-15, DFS <nospam@dfs.com> wrote: > On 05/15/2017 05:05 PM, owl wrote: > >>> You need to install libpq-dev, and you need to link with -lpq: >>> >>> gcc -Wall -o blah blah.c -lpq >>> >>> The #include depends on where your system puts libpq-fe.h >>> run `locate libpq.fe.h` to find it. If it's directly >>> in /usr/incude, you can just put >>> #include <libpq-fe.h> >>> If it's in a subdir under that, prepend the subdir name. > > I did that before I posted the first time: > > $ locate libpq-fe.h > > nothing is found > > > >> Well, it looks like libpq-dev on debian is equivalent to postgresql-libs on arch. >> So just add the -lpq and you should be good to go. > > $ gcc -Wall -o owlpgmod owlpgmod.c -lpq > > /usr/bin/ld: warning: libssl.so.1.1, needed by > /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../lib/libpq.so, not > found (try using -rpath or -rpath-link) > > /usr/bin/ld: warning: libcrypto.so.1.1, needed by > /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../lib/libpq.so, not > found (try using -rpath or -rpath-link) > > /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/../../../../lib/libpq.so: > undefined reference to `BIO_set_flags@OPENSSL_1_1_0' > > ... + another 35 or so undefined references > > Looks like everything is related to libssl or libcrypto. > > > >> For starting postgres, try: >> >> /etc/init.d/postgresql start >> or >> /etc/init.d/postgresql-<version> start >> or >> systemctl postgresql.service start >> or >> pg_ctl start > > > $ sudo /etc/init.d/postgresql start > sudo: /etc/init.d/postgresql: command not found > > $ sudo /etc/init.d/postgresql-9.6.2 start > sudo: /etc/init.d/postgresql-9.6.2: command not found > > $ sudo systemctl postgresql.service start > Unknown operation postgresql.service. > > $ sudo pg_ctl start > pg_ctl: error while loading shared libraries: libssl.so.1.1: cannot open > shared object file: No such file or directory > >> Everybody does things their own way. > > The Windows installation was more painful (download .msi etc), but > everything worked afterwards. Here the install was a snap (pacman -S > postgresql) but nothing works. > > I haven't tried rebooting :) Just in case, if you didn't update the locate db after installing the database try that and then locate again. $ sudo updatedb -- Marek Novotny https://github.com/marek-novotny
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-15 18:45 -0400 |
| Message-ID | <ofdbab$fjo$1@dont-email.me> |
| In reply to | #414728 |
On 05/15/2017 06:24 PM, Marek Novotny wrote: > Just in case, if you didn't update the locate db after installing the > database try that and then locate again. > > $ sudo updatedb I'll have to remember that one, but it didn't make a difference as far as being able to start the postgres service.
[toc] | [prev] | [next] | [standalone]
| From | Marek Novotny <marek.novotny@marspolar.com> |
|---|---|
| Date | 2017-05-15 17:57 -0500 |
| Message-ID | <OsCdndD2zcDIr4fEnZ2dnUU7-L-dnZ2d@giganews.com> |
| In reply to | #414732 |
On 2017-05-15, DFS <nospam@dfs.com> wrote: > On 05/15/2017 06:24 PM, Marek Novotny wrote: > >> Just in case, if you didn't update the locate db after installing the >> database try that and then locate again. >> >> $ sudo updatedb > > I'll have to remember that one, but it didn't make a difference as far > as being able to start the postgres service. It's not for that. It to update the database locate uses to locate files. You were looking for a library or something that might have been installed after installing postgresql. man locate -- Marek Novotny https://github.com/marek-novotny
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-15 11:30 -0400 |
| Message-ID | <ofcvus$514$2@dont-email.me> |
| In reply to | #414510 |
On 05/13/2017 02:24 PM, owl wrote:
> -------------------------- boo.c ---------------------------
> #include <postgresql/libpq-fe.h>
I have something fairly cool to show you, but I'm running into path
issues trying to compile your code on Linux.
* installed postgres (successful)
[dfs@manjaro dev]$ sudo pacman -S postgresql
Packages (2) postgresql-libs-9.6.2-1 postgresql-9.6.2-1
(1/2) installing postgresql-libs [######################] 100%
(2/2) installing postgresql [######################] 100%
$ gcc owlpgmod.c -o owlpgmod
owlpgmod.c:3:33: fatal error: postgresql/libpq-fe.h: No such file or
directory
#include <postgresql/libpq-fe.h>
^
compilation terminated.
So I hard-coded it:
#include "/usr/include/libpq-fe.h"
$ gcc owlpgmod.c -o owlpgmod
/tmp/ccgNVaiL.o: In function `main':
owlpgmod.c:(.text+0x36b): undefined reference to `PQconnectdb'
owlpgmod.c:(.text+0x380): undefined reference to `PQexec'
...
About 20 undefined references
I even tried copying the libpq.so.5.9 into the directory where the
source .c file is located, and gcc threw a bunch of different errors,
all related to files not available where they're supposed to be.
What am I doing wrong?
Note: this is all moot for now, as postgres won't even launch to let me
initialize a db. There's a postgres executable in /usr/bin
[dfs@manjaro ~]$ sudo postgres
[sudo] password for dfs:
postgres: error while loading shared libraries: libssl.so.1.1: cannot
open shared object file: No such file or directory
Do you have an LD_LIBRARY_PATH set in your environ variables?
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-15 20:53 -0400 |
| Message-ID | <ofdiam$nl$3@dont-email.me> |
| In reply to | #414510 |
On 5/13/2017 2:24 PM, owl wrote:
-------------------------- boo.c ---------------------------
struct timespec startmaster,startrows,start,stop;
time_t second=1483246800;
Hard-coding time_t second=1483246800; is CHEATING LIKE A MF!
What, Granny pointed you to an epoch converter website?
Busted.
The best reference I found on C date/time is
http://zetcode.com/articles/cdatetime/
-------------------------------------------------------------------------
Below is my own C/Postgres routine on Windows, also replica of the
python, and mostly written using postgres docs at
https://www.postgresql.org/docs/9.6/static/libpq.html
128 lines, incl whitespace, brackets and 14 lines of comments.
Note I use a DATE type for the HIREDATE column. Then you can do date
and datediff calculations. And it includes the line-saving timer method
I posted about.
--------------------------bigdata.c-------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <C:\Program Files\PostgreSQL\9.6\include\libpq-fe.h>
#include <Windows.h>
// compile on Windows:
// copy libpq.dll to source directory
// tcc bigdata.c libpq.dll -o bigdata.exe
LARGE_INTEGER
frequency,startMaster,startDrop,startRows,startDistinct,start,end;
double elapsedtime(LARGE_INTEGER startingtimer)
{
QueryPerformanceCounter(&end);
return (end.QuadPart - startingtimer.QuadPart) /
(double)frequency.QuadPart;
}
int main(int argc, char *argv[])
{
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter(&startMaster);
//vars
int i=0,cnt1=0,cnt2=0;
PGresult *rs;
char cSQL[200];
char tbl[] = "colatest.bigdata";
int colcount = 4;
char *columns[] = {"HIREDATE","REG","SALARY","JOB"};
char *display[] = {"Hire Dates","Regs","Salaries","Jobs"};
//random data sources
char *regs[] = {"Ahlstrom","Desk
Rabbit","DFS","Feeb","m4r3K","owl","Relf","Sandman","shitv","Steve
Carroll"};
int salary[] =
{3015,125000,200000,25422,12345,456789,40000,52200,60600,80022};
char *jobs[] = {"shepherd","janitor","IT Master","Linux
advocate","rodeo clown","food prep","road kill
scraper","mortician","grave digger","developer"};
//db connect, drop table, recreate table
QueryPerformanceCounter(&startDrop);
char *conninfo = "host='localhost' dbname='COLATEST' user='COLA'
password='evermore'";
PGconn *conn = PQconnectdb(conninfo);
PQexec(conn, "BEGIN TRANSACTION;");
PQexec(conn, "DROP TABLE IF EXISTS BIGDATA;");
PQexec(conn, "CREATE TABLE BIGDATA (ROWSID SERIAL PRIMARY KEY,
HIREDATE DATE NOT NULL, REG VARCHAR(15) NOT NULL,SALARY INTEGER NOT
NULL,JOB VARCHAR(20) NOT NULL);");
PQexec(conn, "COMMIT;");
printf("%.2fs to drop and recreate table
%s\n",elapsedtime(startDrop),tbl);
//show counts of random source data
int regcount = sizeof(regs) / sizeof(regs[0]);
int salarycount = sizeof(salary) / sizeof(salary[0]);
int jobcount = sizeof(jobs) / sizeof(jobs[0]);
printf("Random Data: 365 Hire Dates, %d Regs, %d Salaries, %d
Jobs\n",regcount,salarycount,jobcount);
//inputs
int baserows = strtol(argv[1], NULL, 10);
int exponent = strtol(argv[2], NULL, 10);
QueryPerformanceCounter(&startRows);
//add base rows
QueryPerformanceCounter(&start);
struct tm sdt = {0,0,0,1,0,(2017-1900)}; // starting date of 1/1/2017
time_t sdts = mktime(&sdt); //convert start date/time to seconds
since epoch
srand(time(NULL));
PQexec(conn, "BEGIN TRANSACTION;");
for(i=0; i<baserows; i++)
{
time_t randSecs = sdts + (86400 * (rand() % 365));
char* randDate = asctime(gmtime(&randSecs));
char* randReg = regs [rand() % regcount];
int randSalary = salary[rand() % salarycount];
char* randJob = jobs [rand() % jobcount];
sprintf(cSQL,"INSERT INTO BIGDATA (HIREDATE,REG,SALARY,JOB)
VALUES('%s','%s',%d,'%s');",randDate,randReg,randSalary,randJob);
PQexec(conn, cSQL);
}
PQexec(conn, "COMMIT;");
rs = PQexec(conn, "SELECT COUNT(ROWSID) FROM BIGDATA;");
cnt1 = strtol(PQgetvalue(rs,0,0),NULL,10);
printf("added %d rows in %.2fs (total = %d rows)\n",cnt1,
elapsedtime(start),cnt1);
//copy all existing rows: row count doubles each loop
PQexec(conn, "BEGIN TRANSACTION;");
for(i=0; i < exponent; i++)
{
QueryPerformanceCounter(&start);
PQexec(conn, "INSERT INTO BIGDATA (HIREDATE,REG,SALARY,JOB) SELECT
HIREDATE,REG,SALARY,JOB FROM BIGDATA;");
rs = PQexec(conn, "SELECT COUNT(ROWSID) FROM BIGDATA;");
cnt2 = strtol(PQgetvalue(rs,0,0),NULL,10);
printf("%d. added %d rows in %.2fs (total = %d rows)\n",i+1,cnt2-cnt1,
elapsedtime(start),cnt2);
cnt1 = cnt2;
}
PQexec(conn, "COMMIT;");
printf("%.2fs to add all data\n",elapsedtime(startRows));
//create indexes
QueryPerformanceCounter(&start);
PQexec(conn,"CREATE INDEX IDXHIREDATE ON BIGDATA (HIREDATE);");
PQexec(conn,"CREATE INDEX IDXREG ON BIGDATA (REG) ;");
PQexec(conn,"CREATE INDEX IDXSALARY ON BIGDATA (SALARY) ;");
PQexec(conn,"CREATE INDEX IDXJOB ON BIGDATA (JOB) ;");
printf("%.2fs to create indexes\n",elapsedtime(start));
//count distinct values in each column
QueryPerformanceCounter(&start);
printf("Random data contains:");
for(i = 0; i < colcount; i++)
{
sprintf(cSQL,"SELECT COUNT(%s) FROM (SELECT DISTINCT %s FROM BIGDATA)
AS CNT;",columns[i],columns[i]);
rs = PQexec(conn,cSQL);
printf(" %s %s",PQgetvalue(rs,0,0),display[i]);
}
printf("\n%.2fs to count distinct\n",elapsedtime(start));
//get db size
rs = PQexec(conn, "SELECT
pg_size_pretty(pg_database_size(current_database())) AS dbsize");
printf("db size is %s\n",PQgetvalue(rs,0,0));
//close
PQclear(rs);
PQfinish(conn);
double elapsed = elapsedtime(startMaster);
printf("Finished: %.2fs total (%.2fm)",elapsed,elapsed/60);
return 0;
}
-------------------------------------------------------------------------
As expected, this C program runs about the same speed as the
python/postgres: 37s to 38s for the 1000 10 setting.
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-16 01:16 +0000 |
| Message-ID | <ac003a.gyu3@rooftop.invalid> |
| In reply to | #414748 |
DFS <nospam@dfs.com> wrote: > On 5/13/2017 2:24 PM, owl wrote: > > -------------------------- boo.c --------------------------- > struct timespec startmaster,startrows,start,stop; > time_t second=1483246800; > > > Hard-coding time_t second=1483246800; is CHEATING LIKE A MF! > > What, Granny pointed you to an epoch converter website? > > Busted. > > > > The best reference I found on C date/time is > http://zetcode.com/articles/cdatetime/ > anon@lowtide:~$ date -d "Jan 1 2017" +%s 1483246800 anon@lowtide:~$ > > ------------------------------------------------------------------------- > Below is my own C/Postgres routine on Windows, also replica of the > python, and mostly written using postgres docs at > https://www.postgresql.org/docs/9.6/static/libpq.html > > 128 lines, incl whitespace, brackets and 14 lines of comments. > > Note I use a DATE type for the HIREDATE column. Then you can do date > and datediff calculations. And it includes the line-saving timer method > I posted about. > There's a "money" type you can use for the salary too. > --------------------------bigdata.c------------------------------------------- > #include <stdio.h> > #include <stdlib.h> > #include <string.h> > #include <time.h> > #include <C:\Program Files\PostgreSQL\9.6\include\libpq-fe.h> > #include <Windows.h> > ... > > return 0; > } > ------------------------------------------------------------------------- > > As expected, this C program runs about the same speed as the > python/postgres: 37s to 38s for the 1000 10 setting. > C is so much prettier than Python. Did you post python/postgres code that I can test here against my C? I'm curious if it's a postgres version issue.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-16 09:32 -0400 |
| Message-ID | <ofeupn$31v$2@dont-email.me> |
| In reply to | #414750 |
On 5/15/2017 9:16 PM, owl wrote:
> anon@lowtide:~$ date -d "Jan 1 2017" +%s
> 1483246800
> anon@lowtide:~$
Let that cheating haunt your dreams...
All you needed was:
struct tm sdt = {0,0,0,1,0,(2017-1900)};
time_t second = mktime(&sdt);
> C is so much prettier than Python.
Neither look particularly good for this exercise.
> Did you post python/postgres code that I can test here against
> my C? I'm curious if it's a postgres version issue.
This code handles SQLite and postgres:
$ python filename.py base exponent dbms
$ python filename.py 1000 10 sqlite
$ python filename.py 10000 3 postgres
As usual you'll have to change the SQLite path or postgres connect info.
-------------------------------------------------------------------
import os, sys, sqlite3, psycopg2, time, random
from datetime import datetime, timedelta
def DCount(col,tbl,criteria):
cSQL = "SELECT COUNT(" + col + ") FROM " + tbl + " "
if criteria != '': cSQL += " WHERE " + criteria + ";"
db.execute(cSQL)
return db.fetchone()[0]
#command line
baserows = int(sys.argv[1])
exponent = int(sys.argv[2])
dbsource = sys.argv[3]
startMaster = time.clock()
#remove and recreate file and table
startDrop = time.clock()
tbl = "BIGDATA"
if dbsource == 'sqlite':
dbName = "D:\BIGDATA.sqlite"
if os.path.exists(dbName):
os.remove(dbName)
conn = sqlite3.connect(dbName)
db = conn.cursor()
cSQL = "CREATE TABLE " + tbl + " (ROWSID INTEGER PRIMARY KEY
AUTOINCREMENT,"
cSQL += "HIREDATE TEXT NOT NULL, REG TEXT NOT NULL, "
cSQL += "SALARY INTEGER NOT NULL , JOB TEXT NOT NULL);"
db.execute (cSQL)
conn.commit()
print "%.2fs to create new file and table %s" % (time.clock() -
startDrop,tbl.lower())
if dbsource == 'postgres':
connectstring = "" \
" host = 'localhost' " \
" dbname = 'COLATEST' " \
" user = 'COLA' " \
" password = 'evermore' "
conn = psycopg2.connect(connectstring)
db = conn.cursor()
db.execute("DROP TABLE IF EXISTS " + tbl + ";")
cSQL = "CREATE TABLE " + tbl + " (ROWSID SERIAL PRIMARY KEY, HIREDATE
DATE NOT NULL, REG VARCHAR(15) NOT NULL,SALARY INTEGER NOT NULL,JOB
VARCHAR(20) NOT NULL);"
db.execute (cSQL)
conn.commit()
print "%.2fs to create table %s" % (time.clock() - startDrop,tbl.lower())
#source for random data
regs = ['Ahlstrom','Desk
Rabbit','DFS','Feeb','m4r3K','owl','Relf','Sandman','shitv','Steve Carroll']
salary = [3015,125000,200000,25422,12345,456789,40000,52200,60600,80022]
jobs = ['shepherd','janitor','IT Master','Linux advocate','rodeo
clown','food prep']
jobs += ['road kill scraper','mortician','grave digger','developer']
print "Source of Random Data:"
print ' 365 Hire Dates, %d Regs, %d Salaries, %d Jobs' % (len(regs),
len(salary), len(jobs))
startRows = time.clock()
#add base N rows
startTime = time.clock()
sdt = datetime(2017,1,1).date()
db.execute("BEGIN TRANSACTION;")
for i in range(baserows):
randDate = sdt + timedelta(days=random.randint(0,364))
randReg = random.choice(regs)
randSalary = random.choice(salary)
randJob = random.choice(jobs)
if dbsource == 'sqlite':
cSQL = "INSERT INTO " + tbl + " (HIREDATE,REG,SALARY,JOB) VALUES (?,
?, ?, ?);"
if dbsource == 'postgres':
cSQL = "INSERT INTO " + tbl + " (HIREDATE,REG,SALARY,JOB) VALUES
(%s,%s,%s,%s);"
db.execute(cSQL,(randDate,randReg,randSalary,randJob))
conn.commit()
cnt1 = DCount("ROWSID", tbl,"")
print "added %d rows in %.2fs (total = %d rows)" % (cnt1, time.clock() -
startTime,cnt1)
#insert all rows again: row count doubles each loop
db.execute("BEGIN TRANSACTION;")
for i in range(exponent):
startTime = time.clock()
cSQL = "INSERT INTO " + tbl + " (HIREDATE,REG,SALARY,JOB) SELECT
HIREDATE,REG,SALARY,JOB FROM " + tbl + ";"
db.execute(cSQL)
cnt2 = DCount("ROWSID", tbl,"")
print "%d added %d rows in %.2fs (total = %d rows)" % (i+1,cnt2-cnt1,
time.clock() - startTime,cnt2)
cnt1 = cnt2
conn.commit()
print "%.2fs to add all data" % (time.clock() - startRows)
#create indexes
startTime = time.clock()
db.execute("CREATE INDEX IDXHIREDATE ON " + tbl + " (HIREDATE);")
db.execute("CREATE INDEX IDXREG ON " + tbl + " (REG);")
db.execute("CREATE INDEX IDXSALARY ON " + tbl + " (SALARY);")
db.execute("CREATE INDEX IDXJOB ON " + tbl + " (JOB);")
print "%.2fs to create indexes" % (time.clock() - startTime)
#count distinct values in each column
startTime = time.clock()
print "Random data contains:"
display = ['Hire Dates','Regs','Salaries','Jobs']
for i, col in enumerate(['HIREDATE','REG','SALARY','JOB']):
db.execute("SELECT COUNT(" + col + ") FROM (SELECT DISTINCT " + col + "
FROM " + tbl + ") AS CNT;")
print ' ' + str(db.fetchone()[0]) + ' ' + display[i],
print "\n%.2fs to count distinct" % (time.clock() - startTime)
#file size
if dbsource == 'sqlite':
print "File is {:,}".format(os.path.getsize(dbName)), "bytes on disk"
if dbsource == 'postgres':
db.execute("SELECT pg_size_pretty(pg_database_size(current_database()))
As dbsize;")
print "db size is %s" % (db.fetchone()[0])
#close db
db.close()
conn.close()
print "Finished. %.2fs total" % (time.clock() - startMaster)
-------------------------------------------------------------------
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-16 14:22 +0000 |
| Message-ID | <axc8zv003.by9@rooftop.invalid> |
| In reply to | #414785 |
DFS <nospam@dfs.com> wrote:
> On 5/15/2017 9:16 PM, owl wrote:
>
>> anon@lowtide:~$ date -d "Jan 1 2017" +%s
>> 1483246800
>> anon@lowtide:~$
>
>
> Let that cheating haunt your dreams...
>
> All you needed was:
> struct tm sdt = {0,0,0,1,0,(2017-1900)};
> time_t second = mktime(&sdt);
>
Yes, and timegm() for utc:
struct tm startdate={0,0,0,1,0,117,0,0,0};
time_t second=timegm(&startdate);
Or I could save some "time" with:
date -u -d "Jan 1 2017" +%s
We really should have been doing all kinds of error checking
too.
>
>> C is so much prettier than Python.
>
> Neither look particularly good for this exercise.
>
s/look/looks/
>
>
>> Did you post python/postgres code that I can test here against
>> my C? I'm curious if it's a postgres version issue.
>
>
> This code handles SQLite and postgres:
> $ python filename.py base exponent dbms
> $ python filename.py 1000 10 sqlite
> $ python filename.py 10000 3 postgres
>
> As usual you'll have to change the SQLite path or postgres connect info.
>
> -------------------------------------------------------------------
> import os, sys, sqlite3, psycopg2, time, random
> from datetime import datetime, timedelta
>
I'll run some tests later. My wife's cousin is bringing his laptop
over today for me to "fix." Dumbass forgot his password. Oh boy.
Fixing other people's computers. My favorite thing.
https://whyevolutionistrue.files.wordpress.com/2012/04/dogs-diary_cats-diary.jpg
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-16 14:03 -0400 |
| Message-ID | <offeg4$tvn$3@dont-email.me> |
| In reply to | #414788 |
On 5/16/2017 10:22 AM, owl wrote: > We really should have been doing all kinds of error checking > too. For instance: change the HIREDATE column type from DATE to INTEGER and my C/postgres code will run all the way through but insert 0 rows. Aside - check this out: http://imgur.com/a/dLkuU It's coincidental with the recent ransomware news, but starting yesterday Avira antivirus now associates executables compiled from my C/postgres code with what they call 'HEUR/APC (Cloud)'. Avira is fucked up software: you can whitelist those executables, restore them from 'quarantine', and then they'll run, but now it won't let you delete or replace those .exes in that folder. $ del testpg.exe Access is denied. $ tcc testpg.c libpq.dll -o testpg.exe tcc: error: could not write 'testpg.exe': Permission denied So I would have to compile to a different .exe name every time... but each and every time the new .exe is flagged as malware. I tried to whitelist folder/*.* but it didn't work. How bogus. Uninstalled that Avira crapware and Windows immediately turned on Windows Defender. $ del testpg.exe (no problem) $ tcc testpg.c libpq.dll -o testpg.exe (no problem) $ testpg 1000 4 2.02s to drop and recreate table colatest.bigdata Random Data: 365 Hire Dates, 10 Regs, 10 Salaries, 10 Jobs added 0 rows in 0.07s (total = 0 rows) 1. added 0 rows in 0.00s (total = 0 rows) 2. added 0 rows in 0.00s (total = 0 rows) 3. added 0 rows in 0.00s (total = 0 rows) 4. added 0 rows in 0.00s (total = 0 rows) 0.07s to add all data 0.00s to create indexes Random data contains: (null) Hire Dates (null) Regs (null) Salaries (null) Jobs 0.00s to count distinct db size is (null) Finished: 2.09s total (0.03m) (demo of untrapped error described above) >>> C is so much prettier than Python. >> >> Neither look particularly good for this exercise. >> > > s/look/looks/ Wrong. <quote> The pronoun neither, then, is not invariably singular, though it is more often so. When formal agreement obtains, it takes a singular verb. When notional agreement obtains, it takes either a singular or plural verb. These constructions are neither nonstandard or [sic] erroneous. If you are writing something in a highly formal style, you will probably want to use formal agreement throughout. Otherwise, follow your own inclination in choosing singular or plural constructions after neither. </quote> https://english.stackexchange.com/questions/10304/which-is-correct-neither-is-or-neither-are Now s/tfu > I'll run some tests later. My wife's cousin is bringing his laptop > over today for me to "fix." Dumbass forgot his password. Oh boy. > Fixing other people's computers. My favorite thing. > > https://whyevolutionistrue.files.wordpress.com/2012/04/dogs-diary_cats-diary.jpg Nice of you to help the father of her children...
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-10 09:23 -0400 |
| Message-ID | <oev433$bm5$4@dont-email.me> |
| In reply to | #414159 |
On 5/9/2017 6:01 PM, owl wrote: > First stab at a GUI for this 1,000,000 record database (expanded to fifteen > names) using xforms: > > https://vid.me/Yq32 How much trouble to filter lists from values chosen in other lists? > The xforms package comes with a crapload of demos for most widgets, > with source code, along with at GUI form builder. I played with the > builder for a while but ended up just tweaking one of the demos to work > with postgres. It's nowhere near complete, but shows how easy it is to > get started with xforms. > > http://xforms-toolkit.org/ I'm getting closer to finishing my Access Usenet app. Few more reports, fix some bugs... https://vid.me/EDSy
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-10 22:21 +0000 |
| Message-ID | <szb903.ahb@rooftop.invalid> |
| In reply to | #414200 |
DFS <nospam@dfs.com> wrote: > On 5/9/2017 6:01 PM, owl wrote: > > >> First stab at a GUI for this 1,000,000 record database (expanded to fifteen >> names) using xforms: >> >> https://vid.me/Yq32 > > How much trouble to filter lists from values chosen in other lists? > Well, you can do this sort of thing fairly easily: https://vid.me/Kl7w > > > >> The xforms package comes with a crapload of demos for most widgets, >> with source code, along with at GUI form builder. I played with the >> builder for a while but ended up just tweaking one of the demos to work >> with postgres. It's nowhere near complete, but shows how easy it is to >> get started with xforms. >> >> http://xforms-toolkit.org/ > > > > I'm getting closer to finishing my Access Usenet app. Few more reports, > fix some bugs... > > https://vid.me/EDSy > Are you planning to go with something besides Access for the GUI in the future?
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-11 11:21 -0400 |
| Message-ID | <of1va0$v7q$3@dont-email.me> |
| In reply to | #414253 |
On 5/10/2017 6:21 PM, owl wrote: > Well, you can do this sort of thing fairly easily: > https://vid.me/Kl7w That's a start, but you can't build a good system if you can only show one column of data. You'll be better off with Gambas. > Are you planning to go with something besides Access for the GUI > in the future? HTML
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-11 22:42 +0000 |
| Message-ID | <hvzcmdki93.ag@rooftop.invalid> |
| In reply to | #414291 |
DFS <nospam@dfs.com> wrote: > On 5/10/2017 6:21 PM, owl wrote: > >> Well, you can do this sort of thing fairly easily: >> https://vid.me/Kl7w > > That's a start, but you can't build a good system if you can only show > one column of data. > You're not limited to one column of data. You just don't get a grid. You can draw your own grid lines or separate the fields into different "browsers" (what xforms calls the widget). You can link the different browsers so that they scroll as one. This is actually better than putting it all in one browser, because selections are then more like "cell" selections. With everything in a single browser, selections would have to be parsed in order to pass just the value you're interested in to a query. https://vid.me/HywL That's the same query presented in two different ways. On the left are three boxes, one for each field. On the right is one box with all three fields. All of the lines were done with sprintf. > You'll be better off with Gambas. > > >> Are you planning to go with something besides Access for the GUI >> in the future? > > HTML Yeah, but <ugh>html</ugh>...
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-11 22:43 -0400 |
| Message-ID | <of378n$q0b$3@dont-email.me> |
| In reply to | #414318 |
On 5/11/2017 6:42 PM, owl wrote:
> DFS <nospam@dfs.com> wrote:
>> On 5/10/2017 6:21 PM, owl wrote:
>>
>>> Well, you can do this sort of thing fairly easily:
>>> https://vid.me/Kl7w
>>
>> That's a start, but you can't build a good system if you can only show
>> one column of data.
>>
>
> You're not limited to one column of data. You just don't get a grid.
> You can draw your own grid lines or separate the fields into different
> "browsers" (what xforms calls the widget). You can link the different
> browsers so that they scroll as one. This is actually better than putting
> it all in one browser, because selections are then more like "cell"
> selections. With everything in a single browser, selections would have to
> be parsed in order to pass just the value you're interested in to a query.
As long as you can parse it in some way, you're OK.
You should be able to programatically address any cell (hidden or
showing) in any selected row in a multi-column, multi-select list, or in
a grid ('datasheet' in Access parlance)
https://vid.me/0QC0
The Go buttons run code to read the values shown on screen.
> https://vid.me/HywL
>
> That's the same query presented in two different ways. On the left
> are three boxes, one for each field. On the right is one box with all
> three fields. All of the lines were done with sprintf.
synchronized scrolling? Russia always wins that event...
>> You'll be better off with Gambas.
>>
>>
>>> Are you planning to go with something besides Access for the GUI
>>> in the future?
>>
>> HTML
>
> Yeah, but <ugh>html</ugh>...
<html>
<body>
I know, but... hold on... <strong>belch!</strong>
</body>
</html>
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-12 04:43 +0000 |
| Message-ID | <achvi003.atr@rooftop.invalid> |
| In reply to | #414336 |
DFS <nospam@dfs.com> wrote:
> On 5/11/2017 6:42 PM, owl wrote:
>> DFS <nospam@dfs.com> wrote:
>>> On 5/10/2017 6:21 PM, owl wrote:
>>>
>>>> Well, you can do this sort of thing fairly easily:
>>>> https://vid.me/Kl7w
>>>
>>> That's a start, but you can't build a good system if you can only show
>>> one column of data.
>>>
>>
>> You're not limited to one column of data. You just don't get a grid.
>> You can draw your own grid lines or separate the fields into different
>> "browsers" (what xforms calls the widget). You can link the different
>> browsers so that they scroll as one. This is actually better than putting
>> it all in one browser, because selections are then more like "cell"
>> selections. With everything in a single browser, selections would have to
>> be parsed in order to pass just the value you're interested in to a query.
>
> As long as you can parse it in some way, you're OK.
>
> You should be able to programatically address any cell (hidden or
> showing) in any selected row in a multi-column, multi-select list, or in
> a grid ('datasheet' in Access parlance)
>
> https://vid.me/0QC0
>
> The Go buttons run code to read the values shown on screen.
>
https://vid.me/HvoL
>
>
>
>> https://vid.me/HywL
>>
>> That's the same query presented in two different ways. On the left
>> are three boxes, one for each field. On the right is one box with all
>> three fields. All of the lines were done with sprintf.
>
> synchronized scrolling? Russia always wins that event...
>
>
http://ow.ly/rgm730bEFOR
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-12 14:20 -0400 |
| Message-ID | <of4u60$ank$2@dont-email.me> |
| In reply to | #414343 |
On 5/12/2017 12:43 AM, owl wrote:
>> You should be able to programatically address any cell (hidden or
>> showing) in any selected row in a multi-column, multi-select list, or in
>> a grid ('datasheet' in Access parlance)
>>
>> https://vid.me/0QC0
>>
>> The Go buttons run code to read the values shown on screen.
>>
>
> https://vid.me/HvoL
I'm not seeing a hidden column (usually an ID number) being read.
Too advanced for 1982?
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-12 20:44 +0000 |
| Message-ID | <azc9v03.ahub@rooftop.invalid> |
| In reply to | #414431 |
DFS <nospam@dfs.com> wrote:
> On 5/12/2017 12:43 AM, owl wrote:
>
>>> You should be able to programatically address any cell (hidden or
>>> showing) in any selected row in a multi-column, multi-select list, or in
>>> a grid ('datasheet' in Access parlance)
>>>
>>> https://vid.me/0QC0
>>>
>>> The Go buttons run code to read the values shown on screen.
>>>
>>
>> https://vid.me/HvoL
>
>
> I'm not seeing a hidden column (usually an ID number) being read.
>
> Too advanced for 1982?
I'm not doing any queries there. That's just showing how the callback
for a control can give you selected "cell" items which you could then
pass to another query. The boxes (the first of which is the record id)
were themselves were filled by the tuples from a query, so obviously
there is access to that information. The box on the right has the
unseparated data showing the record ids.
[toc] | [prev] | [next] | [standalone]
| From | DFS <nospam@dfs.com> |
|---|---|
| Date | 2017-05-13 09:06 -0400 |
| Message-ID | <of7054$nv2$2@dont-email.me> |
| In reply to | #414455 |
On 5/12/2017 4:44 PM, owl wrote:
> DFS <nospam@dfs.com> wrote:
>> On 5/12/2017 12:43 AM, owl wrote:
>>
>>>> You should be able to programatically address any cell (hidden or
>>>> showing) in any selected row in a multi-column, multi-select list, or in
>>>> a grid ('datasheet' in Access parlance)
>>>>
>>>> https://vid.me/0QC0
>>>>
>>>> The Go buttons run code to read the values shown on screen.
>>>>
>>>
>>> https://vid.me/HvoL
>>
>>
>> I'm not seeing a hidden column (usually an ID number) being read.
>>
>> Too advanced for 1982?
>
> I'm not doing any queries there. That's just showing how the callback
> for a control can give you selected "cell" items which you could then
> pass to another query. The boxes (the first of which is the record id)
> were themselves were filled by the tuples from a query, so obviously
> there is access to that information. The box on the right has the
> unseparated data showing the record ids.
That sounds like a Yes.
I'm not talking about access to the data.
You need numeric IDs to build a good system, but you don't want to
display them to end-users in the GUI.
Does xforms let you hide columns in a control? Does it have drop-downs?
In Access you would/could:
list.RowSource = "SELECT ID,NAME,ADDRESS,AGE FROM TABLE;"
list.ColumnWidths = "0in;1in;2in;0in"
dropdown.RowSource = "SELECT ID,NAME,ADDRESS,AGE FROM TABLE;"
dropdown.ColumnWidths = "0in;1in;2in;0in"
Then set BoundColumn = 0 (so then references to the list or dropdown
return the ID value in the hidden column)
[toc] | [prev] | [next] | [standalone]
| From | owl <owl@rooftop.invalid> |
|---|---|
| Date | 2017-05-13 16:20 +0000 |
| Message-ID | <aczv9783.a54hu@rooftop.invalid> |
| In reply to | #414497 |
DFS <nospam@dfs.com> wrote:
> On 5/12/2017 4:44 PM, owl wrote:
>> DFS <nospam@dfs.com> wrote:
>>> On 5/12/2017 12:43 AM, owl wrote:
>>>
>>>>> You should be able to programatically address any cell (hidden or
>>>>> showing) in any selected row in a multi-column, multi-select list, or in
>>>>> a grid ('datasheet' in Access parlance)
>>>>>
>>>>> https://vid.me/0QC0
>>>>>
>>>>> The Go buttons run code to read the values shown on screen.
>>>>>
>>>>
>>>> https://vid.me/HvoL
>>>
>>>
>>> I'm not seeing a hidden column (usually an ID number) being read.
>>>
>>> Too advanced for 1982?
>>
>> I'm not doing any queries there. That's just showing how the callback
>> for a control can give you selected "cell" items which you could then
>> pass to another query. The boxes (the first of which is the record id)
>> were themselves were filled by the tuples from a query, so obviously
>> there is access to that information. The box on the right has the
>> unseparated data showing the record ids.
>
>
> That sounds like a Yes.
>
> I'm not talking about access to the data.
>
> You need numeric IDs to build a good system, but you don't want to
> display them to end-users in the GUI.
>
As you can see here, selection of a "cell" gives you full access to
all information in he "row":
https://vid.me/Yxu2
When you draw "lines" in the control as I did here, the lines
actually occupy their own row. Box 1 is the record id field.
I print the line numbers in the selection output boxes so that
you can see how you could reference the data in whatever way you
want.
> Does xforms let you hide columns in a control?
>
Not really. That is done by the queries you write. The boxes
get filled with whatever fields you specify. You can then
take selected values from those filled controls and build
a subsequent query whose field(s) would be displayed in
another control. I actually showed that earlier in the
toys database:
https://vid.me/Kl7w
There the left two boxes are populated from an initial query.
Then items selected in the first box are used to build the
query shown in the pink box. The results of that query are
then displayed in the box on the right.
> Does it have drop-downs?
>
It has several types of dropdowns, but I have not used them yet.
I'm still feeling my way around the logic. I imagine it will be the
same: populate the drop-down with a query, then use selections to
build another query, etc. One hurdle I have run into is that I have
not found a way to have selections from different controls write to the
same box simultaneously. It may be possible, but after trying several
approaches I think I'll set that aside for now and move on to other
parts of the tookit.
>
> In Access you would/could:
> list.RowSource = "SELECT ID,NAME,ADDRESS,AGE FROM TABLE;"
> list.ColumnWidths = "0in;1in;2in;0in"
>
> dropdown.RowSource = "SELECT ID,NAME,ADDRESS,AGE FROM TABLE;"
> dropdown.ColumnWidths = "0in;1in;2in;0in"
>
> Then set BoundColumn = 0 (so then references to the list or dropdown
> return the ID value in the hidden column)
>
In the toys database video above, I used the selected text to build
a query "where p.n='dfs'" for instance. I could have used that selection
of 'dfs' to extract the corresponding record id and build a query based
on that. In other words, it is not necessary to have a field "visible"
in order to use data from that field when building your query.
[toc] | [prev] | [next] | [standalone]
| From | Chris Ahlstrom <OFeem1987@teleworm.us> |
|---|---|
| Date | 2017-05-05 05:28 -0400 |
| Message-ID | <oehgsr$3hb$2@dont-email.me> |
| In reply to | #413025 |
owl wrote this copyrighted missive and expects royalties: > DFS <nospam@dfs.com> wrote: >> On 5/4/2017 3:49 PM, owl wrote: >>> DFS <nospam@dfs.com> wrote: >> >>>> bash == severely pwned >>>> C == severely pwned >>> >>> In your dreams. I see you got the python a bit faster, but C still >>> delivers an epic smackdown. >> >>> Python 0.010s >>> C 0.001s >> >> 14 lines of readable and maintainable python and about 30 minutes dev time >> >> 164 lines of laborious, spaghetti-ish C and how long to write? > > No spaghetti in that code. > >> I like C, but it's just not entertaining or productive for me at this >> time. And forget about using C to write db systems and reports, etc. > > Why? Talking to postgresql in C is straightforward. > >> C = severely severely pwned > > Nope. Next the dumbass will wonder why the Linux kernel isn't written in Python. -- Debian Hint #32: The package 'doc-debian' contains some general documentation about the Debian project. It is also available in Spanish (doc-debian-es), French (doc-debian-fr) and Ukrainian (doc-debian-uk).
[toc] | [prev] | [next] | [standalone]
Page 6 of 9 — ← Prev page 1 2 3 4 5 [6] 7 8 9 Next page →
Back to top | Article view | comp.os.linux.advocacy
csiph-web