On 02/16/18 14:47, Thiemo Kellner, NHC Barhufpflege wrote:
Thanks for answering.
Zitat von Pavel Stehule :
Why you don't create query like
EXECUTE 'SELECT xxx FROM TAB WHERE A = $1.x AND B = $1.y' USING NEW;
I shall try. This would be the direct way, but I doubt the placeholder
$1 can be
Hi all
I would like to have a generic trigger function that compares on insert if
there is already a record in the table with the very same values. Using
PL/pgSQL ( I am not bound to that) I know the insert record structure from the
new record and I can build a select query dynamically from the
Zitat von Daniel Verite :
Thiemo Kellner, NHC Barhufpflege wrote:
> Why you don't create query like
>
> EXECUTE 'SELECT xxx FROM TAB WHERE A = $1.x AND B = $1.y' USING NEW;
I shall try. This would be the direct way, but I doubt the placeholder
$1 can be a record.
It could be writte
Thiemo Kellner, NHC Barhufpflege wrote:
> > Why you don't create query like
> >
> > EXECUTE 'SELECT xxx FROM TAB WHERE A = $1.x AND B = $1.y' USING NEW;
>
> I shall try. This would be the direct way, but I doubt the placeholder
> $1 can be a record.
It could be written without referin
Thanks for answering.
Zitat von Pavel Stehule :
Why you don't create query like
EXECUTE 'SELECT xxx FROM TAB WHERE A = $1.x AND B = $1.y' USING NEW;
I shall try. This would be the direct way, but I doubt the placeholder
$1 can be a record.
I don't understand tou your case, but usually
Hi
2018-02-16 13:20 GMT+01:00 Thiemo Kellner :
> Hi all
>
> I would like to have a generic trigger function that compares on insert if
> there is already a record in the table with the very same values. Using
> PL/pgSQL ( I am not bound to that) I know the insert record structure from
> the new r