From: Brian Evans - Postfix List on
On 1/29/2010 2:41 AM, Serge Fonville wrote:
> On Thu, Jan 28, 2010 at 10:40 PM, Brian Evans - Postfix List
> <grknight(a)scent-team.com> wrote:
>
>> On 1/28/2010 4:12 PM, Serge Fonville wrote:
>>
>>>>>> I using virtual_alias_maps with mysql for storage. Working fine.
>>>>>>
>>>>>> Does anyone have a suggestion on how to update a timestamp field in the
>>>>>> mysql table when postfix finds a virtual_alias_maps match?
>>>>>>
>>>>>> I'm looking for a way to measure alias usage and cull unused aliases.
>>>>>>
>>>>>>
>>>>>>
>>>>> Have you considered a stored procedure?
>>>>>
> If you use a SELECT query, does it use CALL?
>
>

This would be a stored function, not a procedure, to be called from a
SELECT.
A stored function *must* return a single result and cannot output a
result set.
This does not seem it would work for the OP because the query would
always match from the Postfix point of view.

Stored procedures in MySQL must be invoked by CALL.

From: Serge Fonville on
On Fri, Jan 29, 2010 at 2:51 PM, Brian Evans - Postfix List
<grknight(a)scent-team.com> wrote:
> On 1/29/2010 2:41 AM, Serge Fonville wrote:
>> On Thu, Jan 28, 2010 at 10:40 PM, Brian Evans - Postfix List
>> <grknight(a)scent-team.com> wrote:
>>
>>> On 1/28/2010 4:12 PM, Serge Fonville wrote:
>>>
>>>>>>> I using virtual_alias_maps with mysql for storage. Working fine.
>>>>>>>
>>>>>>> Does anyone have a suggestion on how to update a timestamp field in the
>>>>>>> mysql table when postfix finds a virtual_alias_maps match?
>>>>>>>
>>>>>>> I'm looking for a way to measure alias usage and cull unused aliases.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Have you considered a stored procedure?
>>>>>>
>> If you use a SELECT query, does it use CALL?
>>
>>
>
> This would be a stored function, not a procedure, to be called from a
> SELECT.
> A stored function *must* return a single result and cannot output a
> result set.
> This does not seem it would work for the OP because the query would
> always match from the Postfix point of view.
>
> Stored procedures in MySQL must be invoked by CALL.
>
Hmmm...

Makes sense.
A stored function then would solve it?

Regards,

Serge Fonville

--
http://www.sergefonville.nl

Convince Google!!
They need to support Adsense over SSL
https://www.google.com/adsense/support/bin/answer.py?hl=en&answer=10528
http://www.google.com/support/forum/p/AdSense/thread?tid=1884bc9310d9f923&hl=en