Sent from my iPhone
İ
On 16 Tem 2013, îat 08:24, Tom Lane wrote:
> Stefan Sylla writes:
>> Now I want to use a trigger function to automatically update the column
>> 'id_test1_poly' in tabel 'test1_point':
>
>> /**/
>> create or replace function test1_point_get_id_test1_poly() returns
>> tr
> -Original Message-
> From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-
> ow...@postgresql.org] On Behalf Of ssylla
> Sent: Tuesday, July 16, 2013 3:58 AM
> To: pgsql-sql@postgresql.org
> Subject: Re: [SQL] update column based on postgis query on anther table
&
Hi Tom,
I tried changing the trigger to be BEFORE instead of AFTER:
create trigger test1_point_get_id_test1_poly
before insert or update on test1_point for each row execute procedure
test1_point_get_id_test1_poly();
But the problem persits, the column id_test1_poly remains empty.
Stefan
--
Stefan Sylla writes:
> Now I want to use a trigger function to automatically update the column
> 'id_test1_poly' in tabel 'test1_point':
> /**/
> create or replace function test1_point_get_id_test1_poly() returns
> trigger as $$
> begin
> new.id_test1_poly=test1_point_get_id_test1
Dear list,
This might be a postgis-specific question, but I could not get access to
the postgis mailing list so I will have a try here as my problem might
be related to SQL:
I need to update a column of a table based on a postgis-query function
that involves another table as follows:
Assum
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org]
On Behalf Of ssylla
Sent: Wednesday, February 08, 2012 9:31 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] update column with multiple values
Dear list,
sorry, I already posted this, but it
UPDATE admin
SET parent = SUBSTR(id,1,4);
Doesn't it do what you want?
Best,
Oliveiros
- Original Message -
From: "ssylla"
To:
Sent: Thursday, February 09, 2012 1:58 AM
Subject: [SQL] update column
Dear list,
sorry, I already posted this, but it did not se
Dear list,
sorry, I already posted this, but it did not seem to have been accepted by
the mailing list. So here's my second try:
I need to update all rows of a column ('parent') based on a subquery that
returns me the first four digits of another column ('id'):
UPDATE admin SET parent=(SELECT SU
Dear list,
sorry, I already posted this, but it did not seem to have been accepted by
the mailing list. So here's my second try:
I need to update all rows of a column ('parent') based on a subquery that
returns me the first four digits of another column ('id'):
UPDATE admin SET parent=(SELECT SU
Hi..
I try "rowtype" in trigger, ex:
create or replace function fn_tr_aiu_pdcblc() returns trigger as '
declare
c_pdcblc cursor for select * from t_pdcblc where fc_branch=new.fc_branch
and fc_bankacct=new.fc_bankacct;
balance decimal(30,5);
row_pdcblc t_pdcblc%rowtype;
begin
balance:=
10 matches
Mail list logo