BUG #13744: Postgresql function auto add 's' character to the end of string

From: b(dot)phamhuu(at)jacobs-university(dot)de
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13744: Postgresql function auto add 's' character to the end of string
Date: 2015-10-29 12:57:30
Message-ID: 20151029125730.3019.68524@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13744
Logged by: Bang
Email address: b(dot)phamhuu(at)jacobs-university(dot)de
PostgreSQL version: 9.2.13
Operating system: Centos 7
Description:

I've a function in Postgresql database. However, every time I run the
function in postgresql, it auto add character 's' behind of the query so it
will be error when execute (for example: WHAT IN HERE: query SELECT uom_id
FROM ps_quantity where id = 11s ). My version is Postgresql 9.2.13. How can
I solve this?

CREATE OR REPLACE FUNCTION select_field(
selected_table text,
selected_field text,
field_type_sample anyelement,
where_clause text DEFAULT ''::text)
RETURNS anyelement AS
$BODY$ DECLARE
-- Log
ME constant text := 'selected_field()';
-- Local variables
_qry varchar := '';
_result_value ALIAS FOR $0;
where_clause1 varchar := 'asdasdsad';
BEGIN
RAISE NOTICE 'FUNCTION: SELECT_FIELD';
-- BANGPH
RAISE NOTICE 'BANGPH - CHANGE 11s to 11';

_qry := 'SELECT uom_id FROM ps_quantity where id = 11';

RAISE NOTICE 'WHERE = %s', where_clause1;

RAISE NOTICE 'WHAT IN HERE: query %s', _qry;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message duncanmgillis 2015-10-29 13:07:25 BUG #13745: Alias notation after WITH ORDINALITY flattens composite types
Previous Message Alvaro Herrera 2015-10-29 12:57:14 Re: Re: BUG #13739: Recurring corrupted page pointer panics on hot-standby replica