Hmmm... I didn't know PostgreSQL had a facility for query logging and
debugging of parameters to a logfile. Thought I had to execute a describe
or something like that. Thanks, I'll try it to see what's happening!
2017-02-10 16:57 GMT-05:00 Adrian Klaver :
> On
Hi Rob,
Thanks for your answer. The query is just an example I made to illustrate
the problem. In the database I'm working with, duedate is a timestamp
without timezone column, which can contain null values. The parameter is
supposed to be of type DATE. From Java, I'm sending a Date object (which
Hi,
The parameter defaultDueDate is a java.sql.Date object, an actual Date.
When I run the query with the value in it, it works:
```sql
db=> select COALESCE(duedate, date '2017-02-01' + 1) from invoices order by
duedate desc;
coalesce
-
2017-02-02 00:00:00
2017-02-02
Hi Arjen,
I already tried that too. In that case, the error changes to
`org.postgresql.util.PSQLException: ERROR: COALESCE types timestamp without
time zone and interval cannot be matched`.
I listed all the operators available for dates, and `+` and `-` take a date
and an integer to return a
On Friday, February 10, 2017 6:46:08 PM EST David G. Johnston wrote:
> In short - this is the wrong list (pgsql-j...@postgresql.org is the
> appropriate one; or the official GitHub repo) and you need to provide some
> working self-contained examples showing exactly what you are doing.
>
> On
In short - this is the wrong list (pgsql-j...@postgresql.org is the
appropriate one; or the official GitHub repo) and you need to provide some
working self-contained examples showing exactly what you are doing.
On Fri, Feb 10, 2017 at 8:17 AM, Roberto Balarezo
wrote:
> Hi,
Hello Roberto,
On Fri, 2017-02-10 at 16:43 -0500, Roberto Balarezo wrote:
> Hi Rob,
>
> Thanks for your answer. The query is just an example I made to
> illustrate the problem. In the database I'm working with, duedate is
> a timestamp without timezone column, which can contain null values.
> The
On 02/10/2017 02:14 PM, Roberto Balarezo wrote:
Hmmm... I didn't know PostgreSQL had a facility for query logging and
debugging of parameters to a logfile. Thought I had to execute a
describe or something like that. Thanks, I'll try it to see what's
happening!
Start here:
On 02/10/2017 01:51 PM, Roberto Balarezo wrote:
Hi,
The parameter defaultDueDate is a java.sql.Date object, an actual Date.
When I run the query with the value in it, it works:
```sql
db=> select COALESCE(duedate, date '2017-02-01' + 1) from invoices order
by duedate desc;
coalesce
On 02/10/2017 01:33 PM, Arjen Nienhuis wrote:
On Feb 10, 2017 8:11 PM, "Roberto Balarezo" > wrote:
Hi, I would like to know why this is happening and some advice if
there is a way to solve this problem:
I have a query like this:
On Feb 10, 2017 8:11 PM, "Roberto Balarezo" wrote:
Hi, I would like to know why this is happening and some advice if there is
a way to solve this problem:
I have a query like this:
select COALESCE(duedate, ? + 1) from invoices order by duedate desc limit 10;
where ? is a
On 02/10/2017 07:17 AM, Roberto Balarezo wrote:
Hi, I would like to know why this is happening and some advice if there
is a way to solve this problem:
I have a query like this:
|select COALESCE(duedate, ? + 1) from invoices order by duedate desc
limit 10; |
What is the 1 in ? + 1 supposed
Hello Roberto,
On Fri, 2017-02-10 at 10:17 -0500, Roberto Balarezo wrote:
> Hi, I would like to know why this is happening and some advice if
> there is a way to solve this problem:
>
> I have a query like this:
>
> select COALESCE(duedate, ? + 1) from invoices order by duedate desc
> limit 10;
Hi, I would like to know why this is happening and some advice if there is
a way to solve this problem:
I have a query like this:
select COALESCE(duedate, ? + 1) from invoices order by duedate desc limit 10;
where ? is a query parameter. I’m using JDBC to connect to the database,
and sending
14 matches
Mail list logo