Re: Postgres SQL unable to handle Null values for Text datatype

2022-09-06 Thread Lutz Horn
> org.postgresql.util.PSQLException: ERROR: operator does not exist: character > varying = bytea This has been discussed on Stack Overflow[0]. The answer with the highest approval suggests to use coalesce[1]: ``` Select * from A where middle_name = coalesce(?1) ``` Lutz [0]

Re: [Beginner Querstion]Where can I find the news of database?

2022-09-03 Thread Lutz Horn
> As you can see,I want to get some latest news,opinions of the database,but I > don't know where I can get them. You can subscribe to https://www.postgresql.org/list/pgsql-announce/ Lutz

Re: Select "todays" timestamps in an index friendly way

2018-10-23 Thread Lutz Horn
On Tue, Oct 23, 2018 at 03:50:14PM +0200, Francisco Olarte wrote: > It'is not as the problem was stated. Although ts defaulted to now(), > and it is probably defaulted, nothing prohibits him from inserting > timestamps in the future. Yes, this table is only used as an example for the technical

Re: Select "todays" timestamps in an index friendly way

2018-10-23 Thread Lutz Horn
Hi Thomas, On Tue, Oct 23, 2018 at 12:11:55PM +0200, Thomas Kellerer wrote: > I typically use: > > where ts >= date '2018-10-23' > and ts < date '2018-10-23' + 1 But here the date is an explicit value. Francisco reworded my question: > if your definition of today is 'same value as now()

Re: Select "todays" timestamps in an index friendly way

2018-10-23 Thread Lutz Horn
Hi Francisco, On Tue, Oct 23, 2018 at 12:05:17PM +0200, Francisco Olarte wrote: > 1st remark. Do NOT use closed interval for timestamps. Always use > half-open or you'll run into problems Good point, thanks. > where ts >= date_trunc('day',now()) > and ts < date_trunc('day',now()+'1 day')

Select "todays" timestamps in an index friendly way

2018-10-23 Thread Lutz Horn
Hi, I am looking for a way to select all timestamps that are "today" in an index friendly way. This select should not depend on the concrete value of "today". Given a table create temporary table t ( id SERIAL primary key, ts timestamp not null default now() ); with some

Re: Code of Conduct plan

2018-06-05 Thread Lutz Horn
Am 05.06.2018 17:26 schrieb Joshua D. Drake: As one of the people that interacts with external members of the community more than most, I can tell you that a CoC is something the wider community wants. I have sat in feedback meetings with hundreds of people who are potential community members.

Re: Code of Conduct plan

2018-06-05 Thread Lutz Horn
Am 05.06.2018 17:33 schrieb Joshua D. Drake: Let's remember that we are an International project and let's not direct particular frustration at any particular set of values. It would be very easy to start a culture war within this thread alone. I am not quite sure what you mean by "particular

Re: Code of Conduct plan

2018-06-05 Thread Lutz Horn
Am 05.06.2018 17:03 schrieb Chris Travers: On to the code of conduct committee: This needs to be explicitly international and ideally people from very different cultures. This is the best protection against one small group within one country deciding to push a political agenda via the Code