PG Bug reporting form <noreply@postgresql.org> writes:
> A few lines of SQL to clarify the situation:
This isn't clarifying much. If I guess at your table definitions,
it works for me:
regression=# create table r_source (source text primary key);
CREATE TABLE
regression=# create table ppdm_rule_remark(source text references r_source);
CREATE TABLE
regression=# insert into r_source values ('PPDM39RNEX');
INSERT 0 1
regression=# select source from r_source where source = 'PPDM39RNEX' \gset
regression=# \echo :source
PPDM39RNEX
regression=# INSERT INTO ppdm_rule_remark("source") values (:'source');
INSERT 0 1
Please provide a *self contained* example if you want us to
investigate more closely.
regards, tom lane