Re: Microsoft buys GitHub, is this a threat to open-source

2018-06-07 Thread Paul Linehan
> Of course, this only holds for the very relaxed definition of open
> source. RMS would/will be using this as a clear example of MS destroying
> open source and the weakness of the general open source movement when it
> fails to emphasise freedom.


He's already said that GitHub isn't appropriate for free software -
sensu Stallman.

https://lists.gnu.org/archive/html/discuss-gnustep/2015-12/msg00168.html


> For a strict open source definition which
> emphasises freedom rather than just 'openness', Github would likely
> already be ruled out due to their restrictive terms and conditions
> regarding ownership and licenses. However, the subtleties of RMS's
> concerns are often misunderstood and incompatible with our tendency to
> focus on short term, low friction solutions.


Of course it would be against his principles - it's just another
closed-source software company.

Why people are complaining and threatening to jump ship just because
it was bought by another entity whose only concern and priority (by
**law**) is the bottom line, is completely beyond me!


GitLab are also commercial, but I believe that they have the right
blend of commercial and Open Source - you can't expect a company to
host millions of projects on nothing but fresh air!


From: https://en.wikipedia.org/wiki/GitLab

> In June 2018, the acquisition of competitor GitHub by Microsoft[24][25] 
> caused a migration of over 250,000 projects to GitLab[26].


I just don't understand why people think Microsoft was any different
from GitHub before the acquisition?




Pól...


> Tim



Re: Microsoft buys GitHub, is this a threat to open-source

2018-06-07 Thread Paul Linehan
>   Sourceforge seems to be out of favor, too,  so are there any open source
> platforms that provide services that sourceforge and github do?


In a word: GitLab!


Pól...



> Rich



Re: Microsoft buys GitHub, is this a threat to open-source

2018-06-07 Thread Paul Linehan
> Microsoft has bought GitHub for $7.5 billion, is this a threat to the open
> source community?


Only to the extent that GitHub was a threat before this. They never
embraced Open Source!

They cynically portrayed themselves as the developer's best pal when,
in fact, they are/were nothing more and nothing less than another
commerical software company!

I was planning to start using GitLab before this announcement, but the
change will not affect my  decision one bit - it had been made anyway!

At least GitLab have respect for the Open Source ethos.

I just wish all the whingers would STFU! They got exactly what was on the tin!


Pól...






> Mike Nolan



Re: SQL problem (forgot to change header with earlier post!).

2018-05-29 Thread Paul Linehan
Hi again, and thanks for your efforts on my behalf!

> WITH num AS
> (
>SELECT count (*) as cnt1 FROM v1
>  ),
> div AS
> (
>SELECT count (*) as cnt2 FROM v2
>  )
>  SELECT (num.cnt1::numeric/div.cnt2)
> From num cross join div;


I've tried running this code 4 different ways and none of them work -
your original and my efforts to tweak the code!

This always ends up giving just 1 (integer division - using float) or
1.00 (using numeric).

Check out the fiddle here:
https://dbfiddle.uk/?rdbms=postgres_10=b1bd443baf16d85dee0436333a6fd919


> You could have also written it like your first statement without the CTEs.
> This way requires joining the tables with a cross or Cartesian join.

Yes, the first statement is the way to go on this particular case, but
I'm also trying to understand the ins and outs of CTEs, so I'm
interesting in solving this one!


Thanks again,


Rgs,


Pól...



> Todd



Re: SQL problem (forgot to change header with earlier post!).

2018-05-29 Thread Paul Linehan
Hi and grazie for your reply!


> If it's not an excercise, I think you don't need them


Not an exercise - I have to use the VIEW though - this was only a
sample. In real life the VIEW is trickier!


> select (select count(*) from t1) / (select count(*) from t2)::float

Looks as if the CAST was part of it.

Check here: 
https://dbfiddle.uk/?rdbms=postgres_10=9a15766de01946d7f57b4298d8fb1028

Thanks for your input!


Pól...



Re: SQL problem (forgot to change header with earlier post!).

2018-05-29 Thread Paul Linehan
Hi, and thanks for taking the trouble to reply!


> WITH num AS
> (
>   SELECT count (*) as cnt1 FROM v1
> ),
> div AS
> (
>   SELECT count (*) as cnt2 FROM v2
> )
> SELECT (num.cnt1::numeric/div.cnt2);

I get this error

ERROR:  missing FROM-clause entry for table "num"
LINE 9: SELECT (num.cnt1::numeric/div.cnt2);

Check out the fiddle here -
https://dbfiddle.uk/?rdbms=postgres_10=9fbe33f971b12ce637d03c1e7e452831


> Casting as numeric just in case you might have integer division...


Yeah, forgot about the CASTing bit for the other method!

Thanks again!


Pól...


> Todd



SQL problem (forgot to change header with earlier post!).

2018-05-29 Thread Paul Linehan
Hi all,

I have a problem that I just can't seem to solve:

I want to divide the count of one table by the count of another -
seems simple enough!
I created simple VIEWs with counts of the tables, but I just can't
grasp the logic!

DDL and DML (simplified) at the bottom of post.


I tried various combinations of things like basic SELECTs.


SELECT avg FROM ((SELECT cnt1 FROM v1)/(SELECT cnt2 FROM v2));

and I also tried to use CTEs as follows:

WITH num AS
(
  SELECT cnt1 FROM v1
),
div AS
(
  SELECT cnt2 FROM v2
)
SELECT (num.cnt1/div.cnt2);

Should you require any further information or if this should be on
another list, please don't hesitate to contact me and/or let me know.

I would appreciate a short explanation of where I'm going wrong also.

TIA and rgs,


Pól...

== DDL and DML


CREATE TABLE t1 (x INT);

INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);


CREATE VIEW v1 AS (SELECT COUNT(*) AS cnt1 FROM t1);

CREATE TABLE t2 (y INT);

INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);



Re: binaries for 11 beta compiled with --with-llvm?

2018-05-29 Thread Paul Linehan
Hi all,

I have a problem that I just can't seem to solve:

I want to divide the count of one table by the count of another -
seems simple enough!
I created simple VIEWs with counts of the tables, but I just can't
grasp the logic!

DDL and DML (simplified) at the bottom of post.


I tried various combinations of things like basic SELECTs.


SELECT avg FROM ((SELECT cnt1 FROM v1)/(SELECT cnt2 FROM v2));

and I also tried to use CTEs as follows:

WITH num AS
(
  SELECT cnt1 FROM v1
),
div AS
(
  SELECT cnt2 FROM v2
)
SELECT (num.cnt1/div.cnt2);

Should you require any further information or if this should be on
another list, please don't hesitate to contact me and/or let me know.

I would appreciate a short explanation of where I'm going wrong also.

TIA and rgs,



== DDL and DML


CREATE TABLE t1 (x INT);

INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (4);


CREATE VIEW v1 AS (SELECT COUNT(*) AS cnt1 FROM t1);

CREATE TABLE t2 (y INT);

INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);
INSERT INTO t2 VALUES (5);

CREATE VIEW v2 AS (SELECT COUNT(*) AS cnt1 FROM t2);

2018-05-29 7:47 GMT+01:00 Thomas Kellerer :
> Andres Freund schrieb am 29.05.2018 um 08:28:
>>> But neither the Linux binaries nor the Windows binaries were compiled with 
>>> the --with-llvm option
>>> (will JITting be possible with Windows at all?)
>>
>> Not in 11.
>
> I assumed that ;)
> Not a real problem.
>
> But what about Linux binaries with JITting enabled?
> I would like to test some of our DWH queries to see if that improves 
> performance
>
> Or do I need to compile Postgres 11 myself to get that?
>
> Thomas
>
>
>



Re: Problem compiling PostgreSQL.

2018-05-17 Thread Paul Linehan
Hi again,


As a followup - I ran this command  (do I need to set LD_LIBRARY_PATH?)

[pol@polhost /]$ sudo find . -name "icu*" | grep -v Downloads |  more


And got:


./usr/local/sbin/icupkg
./usr/local/bin/icuinfo
./usr/local/bin/icu-config
./usr/local/lib/icu
./usr/local/lib/pkgconfig/icu-io.pc
./usr/local/lib/pkgconfig/icu-uc.pc
./usr/local/lib/pkgconfig/icu-i18n.pc
./usr/local/share/icu
./usr/local/share/man/man8/icupkg.8
./usr/local/share/man/man1/icu-config.1
./usr/local/include/unicode/icuplug.h
./usr/local/include/unicode/icudataver.h
./usr/bin/icuinfo
./usr/bin/icu-config-64
./usr/bin/icu-config
./usr/lib64/icu
./usr/lib64/pkgconfig/icu-io.pc
./usr/lib64/pkgconfig/icu-uc.pc
./usr/lib64/pkgconfig/icu-i18n.pc
./usr/lib/jvm/java-10-openjdk-10.0.1.10-3.fc28.x86_64/legal/java.base/icu.md
./usr/share/maven-metadata/icu4j.xml
./usr/share/icu
./usr/share/licenses/icu4j
./usr/share/jython/javalib/icu4j_icu4j.jar
./usr/share/maven-poms/icu4j
./usr/share/maven-poms/icu4j/icu4j.pom
./usr/share/java/icu4j
./usr/share/java/icu4j/icu4j.jar
./usr/share/doc/icu4j
./usr/share/man/man1/icu-config.1.gz
./usr/share/man/man1/icuinfo.1.gz
./usr/include/boost/regex/icu.hpp
./usr/include/unicode/icuplug.h
./usr/include/unicode/icudataver.h
[pol@polhost /]$

It seems that the library was installed, but the PostgreSQL make
command can't "see" the libs?



Re: Problem compiling PostgreSQL.

2018-05-17 Thread Paul Linehan
>> On which platform and/or distribution are you trying the code
>> compilation?

> sorry about that - it's Linux Fedora 28, 64 bit Intel X86_64 - Samsung
> laptop, 8GB RAM, quad-core.

PostgreSQL 10.4 also.


Pól...



Re: Problem compiling PostgreSQL.

2018-05-17 Thread Paul Linehan
Hi, and thanks for responding,


>> I'm having problems compiling PostgreSQL.

> On which platform and/or distribution are you trying the code
> compilation?


Ooops!

sorry about that - it's Linux Fedora 28, 64 bit Intel X86_64 - Samsung
laptop, 8GB RAM, quad-core.


Please don't hesitate to ask should you require further information!

Rgs,


Pól...



Problem compiling PostgreSQL.

2018-05-17 Thread Paul Linehan
Hi all,

I'm having problems compiling PostgreSQL.

I can run "make" no problem with this command

./configure --prefix=/home/pol/Downloads/sware/db/pg/inst
--mandir=/home/pol/Downloads/sware/db/pg/inst/man
--docdir=/home/pol/Downloads/sware/db/pg/inst/doc --enable-nls
--with-python --with-openssl --with-systemd --with-uuid=e2fs --with-libxml
--with-libxslt

but not this one

./configure --prefix=/home/pol/Downloads/sware/db/pg/inst
--mandir=/home/pol/Downloads/sware/db/pg/inst/man
--docdir=/home/pol/Downloads/sware/db/pg/inst/doc --enable-nls
--with-python --with-icu --with-openssl --with-systemd --with-uuid=e2fs
--with-libxml --with-libxslt

(for those of you with bad eyesight, the difference is in the extra
"--with-icu" in the second failing command! :-) )


Now, I've installed the icu libraries using the classic ./configure, make
and sudo make install.

The error I'm getting is

make[4]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/port'
make -C ../../src/common all
make[4]: Entering directory '/home/pol/Downloads/sware/db/pg/src/src/common'
make -C ../backend submake-errcodes
make[5]: Entering directory
'/home/pol/Downloads/sware/db/pg/src/src/backend'
make[5]: Nothing to be done for 'submake-errcodes'.
make[5]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/backend'
make[4]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/common'
make[3]: Leaving directory
'/home/pol/Downloads/sware/db/pg/src/src/timezone'
/usr/bin/gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute
-Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard
-O2 -L../../src/port -L../../src/common -Wl,--as-needed
-Wl,-rpath,'/home/pol/Downloads/sware/db/pg/inst/lib',--enable-new-dtags
-Wl,-E access/brin/brin.o access/brin/brin_pageops.o

... a shedload more .o files snipped from error and then at the end:

../../src/timezone/pgtz.o ../../src/port/libpgport_srv.a
../../src/common/libpgcommon_srv.a -lpthread -lxslt -lxml2 -lssl -lcrypto
-lrt -lcrypt -ldl -lm -licui18n -licuuc -licudata -lsystemd -o postgres
commands/collationcmds.o: In function `pg_import_system_collations':
collationcmds.c:(.text+0xe16): undefined reference to
`uloc_countAvailable_61'
collationcmds.c:(.text+0xe36): undefined reference to `uloc_getAvailable_61'
collationcmds.c:(.text+0xe5b): undefined reference to
`uloc_toLanguageTag_61'
collationcmds.c:(.text+0xf0c): undefined reference to
`uloc_countAvailable_61'
collationcmds.c:(.text+0xf85): undefined reference to
`uloc_getDisplayName_61'
collationcmds.c:(.text+0x112e): undefined reference to `u_errorName_61'
regex/regcomp.o: In function `pg_wc_isalpha':
regcomp.c:(.text+0x9a1): undefined reference to `u_isalpha_61'  <--- seems
to be an icu issue here?
regex/regcomp.o: In function `pg_wc_isspace':
regcomp.c:(.text+0xa81): undefined reference to `u_isspace_61'


... snip a lot more undefined reference errors with u__61 in them

and then at the end

varlena.c:(.text+0x2245): undefined reference to `ucol_strcoll_61'
varlena.c:(.text+0x2292): undefined reference to `ucol_strcollUTF8_61'
varlena.c:(.text+0x22c3): undefined reference to `u_errorName_61'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:61: postgres] Error 1
make[2]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src/backend'
make[1]: *** [Makefile:38: all-backend-recurse] Error 2
make[1]: Leaving directory '/home/pol/Downloads/sware/db/pg/src/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2
[pol@polhost src]$


I've compiled PostgreSQL many times and I've always been impressed with the
way it "just works"!

I would be grateful if anybody could show me how I could resolve my issue.

TIA, Pól...