public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Sanjay Minni <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: DEFAULT in update & prepared statements
Date: Wed, 8 Nov 2023 10:21:20 -0700
Message-ID: <CAKFQuwZ0+0GyZytpska6ybFNHLBKg9GKr_czPvBmhg6uQmh2ow@mail.gmail.com> (raw)
In-Reply-To: <CAMpxBo=M35hcH1g4Vg=KRJ0-77FOJcvdrdiVF5KSOAdOG-LvKQ@mail.gmail.com>
References: <CAMpxBo=M35hcH1g4Vg=KRJ0-77FOJcvdrdiVF5KSOAdOG-LvKQ@mail.gmail.com>

On Wednesday, November 8, 2023, Sanjay Minni <[email protected]> wrote:

> Can DEFAULT (defined for a timestamp column as now() ) be used in
> 1. prepared statement i.e. EXECUTE ( ..., DEFAULT, ...)
> 2. in an UPDATE statement  UPDATE TABLE SET update_time = DEFAULT ..
>

5 seconds looking at the syntax for update in the docs answers the second
question.

The first question doesn’t really make sense - but regardless of what you
are trying to communicate there just try it.  If the result you get doesn’t
make sense post what you tried.

David J.


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: DEFAULT in update & prepared statements
  In-Reply-To: <CAKFQuwZ0+0GyZytpska6ybFNHLBKg9GKr_czPvBmhg6uQmh2ow@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox