equal
deleted
inserted
replaced
569 AS $$ |
569 AS $$ |
570 DECLARE |
570 DECLARE |
571 record recipient_transport; |
571 record recipient_transport; |
572 recipient varchar(320) := localpart || '@' || the_domain; |
572 recipient varchar(320) := localpart || '@' || the_domain; |
573 did bigint := (SELECT gid FROM domain_name WHERE domainname = the_domain); |
573 did bigint := (SELECT gid FROM domain_name WHERE domainname = the_domain); |
574 transport_id bigint := (SELECT tid FROM users |
574 transport_id bigint; |
575 WHERE gid = did AND local_part = localpart); |
575 BEGIN |
576 BEGIN |
576 IF did IS NULL THEN |
|
577 RETURN; |
|
578 END IF; |
|
579 |
|
580 SELECT tid INTO transport_id |
|
581 FROM users |
|
582 WHERE gid = did AND local_part = localpart; |
|
583 |
577 IF transport_id IS NULL THEN |
584 IF transport_id IS NULL THEN |
578 SELECT tid INTO STRICT transport_id |
585 SELECT tid INTO STRICT transport_id |
579 FROM domain_data |
586 FROM domain_data |
580 WHERE gid = did; |
587 WHERE gid = did; |
581 END IF; |
588 END IF; |