Re: Trigger with conditional predicates

2021-01-04 Thread Dirk Mika
simply not mentioned at >> all in the UPDATE statement. > > Hmm, that's odd. See thread below: https://www.postgresql.org/message-id/VisenaEmail.26.7cbf2947c8d23ceb.1769a2755ff%40tc7-visena I found that thread already, but It doesn't not provide a solution to my pr

Re: Trigger with conditional predicates

2021-01-04 Thread Dirk Mika
-- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika > > On 1 Jan 2021, at

Re: Trigger with conditional predicates

2021-01-02 Thread Dirk Mika
d. And in the event that the column was not specified in these statements, a trigger is supposed to fill the value. > There's currently no way to detect if the column was simply not mentioned at > all in the UPDATE statement. Hmm, that's odd. BR Dirk -- Dirk Mika Software Develope

Re: Trigger with conditional predicates

2021-01-02 Thread Dirk Mika
> > CREATE TRIGGER tgname BEFORE UPDATE OF column_name [, ... ] ON table ... > > and then the trigger won't fire if the column is not mentioned. Well, this works if I've something like IF UPDATING(...) THEN But since I've IF NOT UPDATING(...) THEN This isn't work

Trigger with conditional predicates

2021-01-01 Thread Dirk Mika
this: IF NOT UPDATING('IS_CANCELED') THEN :new.is_canceled := ...; END IF; I have not found anything similar in PostgreSQL. What is the common approach to this problem? BR Dirk -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str.

Re: Set COLLATE on a session level

2020-12-10 Thread Dirk Mika
-- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika Am 06.12.20, 06:15

Re: Set COLLATE on a session level

2020-12-03 Thread Dirk Mika
sarily complicated to me. > > No one said it is going to be particularly convenient... You > asked for possible, I guess. :-) My sentence was more along the lines that I cannot imagine that I am the first to have this problem and that there should therefore be an easier solution. But a

Re: Set COLLATE on a session level

2020-11-30 Thread Dirk Mika
> > pá 20. 11. 2020 v 15:28 odesílatel Dirk Mika > > napsal: > > > > > Let's assume there is an app that accesses the same database from > > > different countries. And in this app data should be displayed ordered. And > > > the sort order is no

Re: Set COLLATE on a session level

2020-11-20 Thread Dirk Mika
t SQL commands depending on the country? Not nice. Do the data have to be sorted in the app? Not nice either. Regards Dirk -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatimi

Set COLLATE on a session level

2020-11-19 Thread Dirk Mika
statement in the ORDER BY Clause, but then I would have to adjust the statements in the client and statements that are automatically generated by the database components used, would not be affected. Regards Dirk -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str

Re: PostgreSQL equivalent to Oracles ANYDATASET

2020-11-14 Thread Dirk Mika
Hi, many thanks for this suggestion. But the problem with this is that you have to know which columns are returned when you call the function. Regards Dirk -- Dirk Mika Software Developer [cid:mt_c1c59b3d-dd43-4ca6-992b-79f5a19f5999.png] mika:timing GmbH Strundepark - Kürtener Str. 11b

Re: Expression of check constraint

2019-07-04 Thread Dirk Mika
Hi -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika ## How2Use ## the

Re: plpgsql: How to modify a field in an array of records

2019-07-02 Thread Dirk Mika
-- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika ## How2Use ## the

Re: plpgsql: How to modify a field in an array of records

2019-07-02 Thread Dirk Mika
-- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika, Jörg Mika ## How2Use ## the

Re: Use ctid in where clause in update from statement

2019-07-01 Thread Dirk Mika
ge it to an AFTER ROW trigger. Dirk -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m...@mikatiming.de www.mikatiming.de AG Köln HRB 47509 * WEEE-Reg.-Nr. DE 90029884 Geschäftsführer: Harald Mika,

Re: Use ctid in where clause in update from statement

2019-07-01 Thread Dirk Mika
tl_test1: time=0.116 calls=1 Execution Time: 0.180 ms As you can see the trigger function is called for the row I try to insert, but you can also see that there's no tuple inserted but one conflicting. Dirk -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 514

Re: Use ctid in where clause in update from statement

2019-07-01 Thread Dirk Mika
I know I can join using the pk, but in oracle using the rowid is faster so I wanted to know, if this is possible in PostgreSQL as well. Dirk -- Dirk Mika Software Developer mika:timing GmbH Strundepark - Kürtener Str. 11b 51465 Bergisch Gladbach Germany fon +49 2202 2401-1197 dirk.m