Re: Converting sql anywhere to postgres

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Converting sql anywhere to postgres
Дата
Msg-id 41ced76e-3096-d0f4-549d-e15d7db6964c@aklaver.com
обсуждение исходный текст
Ответ на Re: Converting sql anywhere to postgres  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
On 8/16/23 14:16, Rob Sargent wrote:
> 

>>>>> I have just had a quick look at rules and I am not sure how it can be done. Rules still use the concept of NEW
andOLD. If my original row has 'myfield' set to 'me' then I don't think I can tell the difference between:
 
>>>>>
>>>>> Update mytable set afield='something'
>>>>> and
>>>>> Update mytable set afield='something',myfield='me'
>>>>>
>>>>> Within the rule I think NEW.myfield will be set to 'me' in both cases. Please can you explain how I can tell the
differencebetween the two update statements
 
>>>>>
>>> If the original value in the user column is "me", what is the difference between "set other_column = some_value,
user= 'me'" and "set other_column = some_value" at the business level?
 
>>
>> Affirmation that the user updating the record explicitly set the user value.
>>
>> -- 
>> Adrian Klaver
>> adrian.klaver@aklaver.com
>>
> Agreed.  But at the end of the day, the difference is what exactly?  Wouldn't auditing (short of sql logging) say “no
change”with respect to “me” column?
 

That is above my pay grade, that is for the OP to elaborate on. I was 
just saying that the Postgres server could not make that distinction 
with the information provided.



-- 
Adrian Klaver
adrian.klaver@aklaver.com




В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: Converting sql anywhere to postgres
Следующее
От: "[Quipsy] Markus Karg"
Дата:
Сообщение: AW: AW: Cast INTEGER to BIT confusion