Search Postgresql Archives

Re: insert on duplicate update?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Huxton <dev@xxxxxxxxxxxx> writes:
> Peter Filipov wrote:
>> is there in postgres anything similar to:
>> insert .... on duplicate update?
>> here is the problem i need a solution for:
>> I need to insert in pg_type a row which was previously selected from 
>> there  and
>> with slight modifications, the problem is that when i try to insert the row
>> there might be a row with the same 'typname' which is sort of primary key.
>> The second problem is that when doing those operations i don't want to  
>> depend
>> on the specific structure of the pg_type catalog.

> Are you certain it will always be safe to do this?

What makes you think that modifying pg_type directly is a sane idea in
the first place?  When (not if) it breaks, you'll not get a lot of sympathy.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux