equal
deleted
inserted
replaced
494 AS $$ |
494 AS $$ |
495 DECLARE |
495 DECLARE |
496 record recipient_transport; |
496 record recipient_transport; |
497 recipient varchar(320) := localpart || '@' || the_domain; |
497 recipient varchar(320) := localpart || '@' || the_domain; |
498 did bigint := (SELECT gid FROM domain_name WHERE domainname = the_domain); |
498 did bigint := (SELECT gid FROM domain_name WHERE domainname = the_domain); |
499 transport_id bigint := (SELECT tid FROM users |
499 transport_id bigint; |
500 WHERE gid = did AND local_part = localpart); |
500 BEGIN |
501 BEGIN |
501 IF did IS NULL THEN |
|
502 RETURN; |
|
503 END IF; |
|
504 |
|
505 SELECT tid INTO transport_id |
|
506 FROM users |
|
507 WHERE gid = did AND local_part = localpart; |
|
508 |
502 IF transport_id IS NULL THEN |
509 IF transport_id IS NULL THEN |
503 SELECT tid INTO STRICT transport_id |
510 SELECT tid INTO STRICT transport_id |
504 FROM domain_data |
511 FROM domain_data |
505 WHERE gid = did; |
512 WHERE gid = did; |
506 END IF; |
513 END IF; |