pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
returning does not act as expected after viewing documentation
3+ messages / 3 participants
[nested] [flat]

* returning does not act as expected after viewing documentation
@ 2019-09-23 17:47 PG Doc comments form <noreply@postgresql.org>
  2019-09-23 22:17 ` Re: returning does not act as expected after viewing documentation David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Doc comments form @ 2019-09-23 17:47 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: lennartrolland@gmail.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/dml-returning.html
Description:

With the following query:

update batch_log
set status=('in-progress'),
updated_at=now()
where status = ('pending')
and id = (
select id
  from batch_log
  where status = ('pending')
  order by priority desc, updated_at asc
  limit 1
)
returning id, batch_log.update_at
;


I get the following error message:


column batch_log.update_at does not exist
LINE 14:     returning id, batch_log.update_at
HINT:  Perhaps you meant to reference the column "batch_log.updated_at".

This does not make a whole lot of sense. It is recommending that I do what I
am doing!

Also I don't see why this would fail.

I am on PostgreSQL 11 latest official docker image as of today's date
(2019-09-23).


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: returning does not act as expected after viewing documentation
  2019-09-23 17:47 returning does not act as expected after viewing documentation PG Doc comments form <noreply@postgresql.org>
@ 2019-09-23 22:17 ` David G. Johnston <david.g.johnston@gmail.com>
  2019-09-23 22:19   ` Re: returning does not act as expected after viewing documentation lennart rolland <lennartrolland@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: David G. Johnston @ 2019-09-23 22:17 UTC (permalink / raw)
  To: PG Doc comments form <noreply@postgresql.org>; +Cc: pgsql-docs@lists.postgresql.org; lennartrolland@gmail.com

On Mon, Sep 23, 2019 at 2:45 PM PG Doc comments form <noreply@postgresql.org>
wrote:

> update batch_log
> set status=('in-progress'),
> updated_at=now()
> [...]
> returning id, batch_log.update_at
> ;
>


> column batch_log.update_at does not exist
> LINE 14:     returning id, batch_log.update_at
> HINT:  Perhaps you meant to reference the column "batch_log.updated_at".
>
> This does not make a whole lot of sense. It is recommending that I do what
> I
> am doing!
>
> Also I don't see why this would fail.
>

Its informing you, apparently correctly, of a possible typo in your query.
You wrote: returning ... "batch_log.update_at" but the spelling for that
field is in past tense "batch_log.updated_at" - note the "d" on the end of
the word "update".

David J.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: returning does not act as expected after viewing documentation
  2019-09-23 17:47 returning does not act as expected after viewing documentation PG Doc comments form <noreply@postgresql.org>
  2019-09-23 22:17 ` Re: returning does not act as expected after viewing documentation David G. Johnston <david.g.johnston@gmail.com>
@ 2019-09-23 22:19   ` lennart rolland <lennartrolland@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: lennart rolland @ 2019-09-23 22:19 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: PG Doc comments form <noreply@postgresql.org>; pgsql-docs@lists.postgresql.org

Facepalm.

Please disregard my rookie mistake!

On Tue, Sep 24, 2019, 00:18 David G. Johnston <david.g.johnston@gmail.com>
wrote:

> On Mon, Sep 23, 2019 at 2:45 PM PG Doc comments form <
> noreply@postgresql.org> wrote:
>
>> update batch_log
>> set status=('in-progress'),
>> updated_at=now()
>> [...]
>> returning id, batch_log.update_at
>> ;
>>
>
>
>> column batch_log.update_at does not exist
>> LINE 14:     returning id, batch_log.update_at
>> HINT:  Perhaps you meant to reference the column "batch_log.updated_at".
>>
>> This does not make a whole lot of sense. It is recommending that I do
>> what I
>> am doing!
>>
>> Also I don't see why this would fail.
>>
>
> Its informing you, apparently correctly, of a possible typo in your
> query.  You wrote: returning ... "batch_log.update_at" but the spelling for
> that field is in past tense "batch_log.updated_at" - note the "d" on the
> end of the word "update".
>
> David J.
>
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-09-23 22:19 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 17:47 returning does not act as expected after viewing documentation PG Doc comments form <noreply@postgresql.org>
2019-09-23 22:17 ` David G. Johnston <david.g.johnston@gmail.com>
2019-09-23 22:19   ` lennart rolland <lennartrolland@gmail.com>

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