On Sun, 29 Jan 2023, Benny Pedersen wrote:

Jan 29 01:02:00 localhost postgres[15177]: [11-3]               DELETE FROM 
short_url_cache
Jan 29 01:02:00 localhost postgres[15177]: [11-4]               WHERE short_url $1 
= AND created < CAST(EXTRACT(epoch FROM NOW()) AS INT) - 86400
Jan 29 05:40:38 localhost postgres[24315]: [11-1] 2023-01-29 04:40:38.502 UTC [24315] 
ERROR:  syntax error at or near "$1" at character 62

 I'm not an SQL expert. Can you give me more details on how to trigger
 the bug you are pointing out, what it does, and what is expected?

same here, i just report it

This bit:

    WHERE short_url $1 = AND

...should probably be:

    WHERE short_url = $1 AND


The basic expression syntax of SQL is the same as other (infix!) languages..



--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org                         pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Maxim XI: Everything is air-droppable at least once.
-----------------------------------------------------------------------
 3 days until the 20th anniversary of the loss of STS-107 Columbia

Reply via email to