Re: Static PostgreSQL Binaries (Linux + Windows)

2019-01-12 Thread Pratik Parikh
Than you. nice to hear from you . Would be able to share the build scripts with community? are they open source? Regards, Pratik Parikh On Sat, Jan 12, 2019 at 10:57 PM Zach van Rijn wrote: > Hi all, > > > I've been busy porting popular open-source software to various > platforms (Linux + Wind

Static PostgreSQL Binaries (Linux + Windows)

2019-01-12 Thread Zach van Rijn
Hi all, I've been busy porting popular open-source software to various platforms (Linux + Windows) via musl- and/or MinGW- based tools, as part of a project (and future distro?) called 'xstatic' [1]. All packages are statically linked and have zero dependencies, they can be easily reproduced and

Re: CREATE COLLATION to match pg_collation data

2019-01-12 Thread Peter Geoghegan
On Sat, Jan 12, 2019 at 7:13 AM Tom Lane wrote: > That's an ICU collation, so you're out of luck: there is no ICU > support in 9.6. FWIW, there is some form of FreeBSD Postgres support for ICU that predates the officially supported ICU feature. The FreeBSD Postgres packages have been built with I

Re: insert into: NULL in date column

2019-01-12 Thread Rich Shepard
On Sat, 12 Jan 2019, David G. Johnston wrote: Inserting new data into a table qualifies as "data change" in my mind... David, Then it's certainly good enough for me. ;-) Looking at the text file which the application will replace there are occasions when there's more than one contact on

Re: insert into: NULL in date column

2019-01-12 Thread David G. Johnston
On Sat, Jan 12, 2019 at 9:54 AM Rich Shepard wrote: > > The problem is that check constraints are only applied at time of data > > change. >I thought that the check constraint applied at data entry, too. Inserting new data into a table qualifies as "data change" in my mind... David J.

Re: insert into: NULL in date column

2019-01-12 Thread David G. Johnston
On Sat, Jan 12, 2019 at 10:08 AM Ricardo Martin Gomez wrote: > > Hi, > In MYSQL Null date is equal '01/01/1900' or '01/01/1970', I don't remember > but you can also use the same logic for the check_constraint. > Regards Why? PostgreSQL doesn't need hacks around this... David J.

Re: insert into: NULL in date column

2019-01-12 Thread Ricardo Martin Gomez
Hi, In MYSQL Null date is equal '01/01/1900' or '01/01/1970', I don't remember but you can also use the same logic for the check_constraint. Regards Obtener Outlook para Android From: Rich Shepard Sent: Saturday, January 12, 2019 1:54:47 P

Re: insert into: NULL in date column

2019-01-12 Thread Rich Shepard
On Sat, 12 Jan 2019, David G. Johnston wrote: NULL isn't the problem - a check constraint can resolve to unknown in which case it behaves the same as if it resolved as true (i.e., its basically a IS NOT FALSE test in the backend). This is actually a nice feature of check constraints since for n

Re: insert into: NULL in date column

2019-01-12 Thread David G. Johnston
On Sat, Jan 12, 2019 at 9:01 AM Rich Shepard wrote: > > On Sat, 12 Jan 2019, David G. Johnston wrote: > > > Actually, you didn't ask about the check constraint, which is actually > > horribly broken since current_date is not an immutable function. >> >I know that nulls cannot be validly used i

Re: insert into: NULL in date column

2019-01-12 Thread Rich Shepard
On Sat, 12 Jan 2019, David G. Johnston wrote: Actually, you didn't ask about the check constraint, which is actually horribly broken since current_date is not an immutable function. David, I know that nulls cannot be validly used in comparisons which makes the check constraint FUBAR. Thank

Re: insert into: NULL in date column

2019-01-12 Thread David G. Johnston
On Sat, Jan 12, 2019 at 6:43 AM Rich Shepard wrote: > > On Sat, 12 Jan 2019, Ricardo Martin Gomez wrote: > > > Hi, one question. > > Do you put explicit "NULL" in the column value? > > Other option is. > > You have to delete the column "next_contact" in your INSERT clause. > > So, if the column ha

Re: CREATE COLLATION to match pg_collation data

2019-01-12 Thread Tom Lane
rihad writes: > Hi, since pg_import_system_collations() that would solve all this > doesn't exist in 9.6.x, is there a way to I properly map it to a CREATE > COLLATE call? Specifically I need to have this collation (from 10.x) in > 9.6.x so it works on FreeBSD: >     collname    | col

Re: insert into: NULL in date column

2019-01-12 Thread Rich Shepard
On Sat, 12 Jan 2019, Ricardo Martin Gomez wrote: Hi, one question. Do you put explicit "NULL" in the column value? Other option is. You have to delete the column "next_contact" in your INSERT clause. So, if the column has a default value, this value Will be inserted. Else Null value will be inse

Re: insert into: NULL in date column

2019-01-12 Thread Rich Shepard
On Fri, 11 Jan 2019, David G. Johnston wrote: The default does seem a bit arbitrary and pointless... David, That answers my question about it. Thanks again. Best regards, Rich

Re: insert into: NULL in date column

2019-01-12 Thread Rich Shepard
On Fri, 11 Jan 2019, David G. Johnston wrote: VALUES (1, null, 3) is valid, VALUES (1,,3) is not. David, Using null occurred to me when I saw that an empty space still failed. Thanks for clarifying and confirming. Best regards, Rich