View Issue Details

IDProjectCategoryView StatusLast Update
0000287Pgpool-IIBugpublic2017-03-26 16:23
Reporterdomahony Assigned Tot-ishii  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionopen 
Product Version3.6.1 
Summary0000287: Syntax Error in Query Using CURRENT_TIMESTAMP
DescriptionOur application executes the following query:

update wos_order_items
    set status_code = :1,
    wos_message_id = nextval('wos_order_items_status_id_seq'),
    date_last_updated = current_timestamp,
    error_stack_trace = :2
where
    order_item_id in (
        select
            i.order_item_id
        from
            wos_order_items i,
            wos_process_groups g
        where
            i.order_item_id = g.order_item_id
            and g.processing_key = :3
            and i.cancelled != 'T'
    )

The query causes the following error in the PG Pool log:

2017-02-10 16:00:34: pid 20099: LOG: pool_send_and_wait: Error or notice message from backend: : DB node id: 1 backend pid: 22459 statement: "UPDATE "wos_order_items" SET "status_code" = $1, "wos_message_id" = "nextval"('wos_order_items_status_id_seq'), "error_stack_trace" = $2, "date_last_updated" = "pg_catalog"."timestamptz"('2017-02-10 16:00:34.955471-05'::text), "retry_count" = ("retry_count"+1 ) WHERE "order_item_id"( SELECT "i"."order_item_id" FROM "wos_order_items" AS "i","wos_process_groups" AS "g" WHERE ( ("i"."order_item_id"="g"."order_item_id" ) AND ("g"."processing_key"=$3 )))" message: "syntax error at or near "SELECT""
Steps To ReproduceSubmit the query listed below the DB through PGPool:

update wos_order_items
    set status_code = :1,
    wos_message_id = nextval('wos_order_items_status_id_seq'),
    date_last_updated = current_timestamp,
    error_stack_trace = :2
where
    order_item_id in (
        select
            i.order_item_id
        from
            wos_order_items i,
            wos_process_groups g
        where
            i.order_item_id = g.order_item_id
            and g.processing_key = :3
            and i.cancelled != 'T'
    )
Tagserror, pgpool

Activities

t-ishii

2017-02-23 16:54

developer   ~0001358

retry_count" = ("retry_count"+1 )

This seems appear from the air. I cannot imagine how Pgpool-II generates this.

Can you provide self contained test case and pgpool.conf?

t-ishii

2017-03-26 16:23

developer   ~0001399

No response from reporter over 1 month. Close this issue.

Issue History

Date Modified Username Field Change
2017-02-11 06:20 domahony New Issue
2017-02-11 06:20 domahony Tag Attached: error
2017-02-11 06:20 domahony Tag Attached: pgpool
2017-02-23 16:54 t-ishii Note Added: 0001358
2017-02-23 16:55 t-ishii Assigned To => t-ishii
2017-02-23 16:55 t-ishii Status new => feedback
2017-02-23 16:55 t-ishii Steps to Reproduce Updated
2017-03-26 16:23 t-ishii Note Added: 0001399
2017-03-26 16:23 t-ishii Status feedback => closed