I have a number of trigger functions on a table that are performing
various calculations. The table is a column-wise orientation with
multiple columns that could be updated on a single row. In one of the
triggers, I'm performing a calculation but don't want the code to run if
the OLD and NEW valu
Thanks Ken! I missed that option going through the documentation.
>
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Sorry, caught a typo. Mytext1 is correctly replaced because only one
instance of the character (space) is in the string.
This deals with the correct characters but only does the first instance of
the character so the output is:
'Mytext1'
'Mytext 2' (wrong)
'Mytext-3' (wrong)
'M
I'm trying remove all instances of non-alphanumeric or underscore characters
from a query result for further use. This is part of a function I'm writing
that is in plpgsql
Examples:
Original value
'My text1'
'My text 2'
'My-text-3'
'My_text4'
'My!text5'
Desired
'Myt
Integer
On 1/16/13 12:21 PM, "Adrian Klaver" wrote:
>On 01/16/2013 09:16 AM, James Sharrett wrote:
>> The problem I have is that I get nothing back when the COPY is run
>>inside
>> the function other than what I explicitly return from the function so I
>>
since the format and information in the string (when run outside of the
function) are exactly the same.
On 1/16/13 11:42 AM, "Adrian Klaver" wrote:
>On 01/16/2013 08:30 AM, James Sharrett wrote:
>> I have a function that generates a table of records and then a SQL
>> sta
again just
to get a count.
On 1/16/13 11:36 AM, "Rob Sargent" wrote:
>On 01/16/2013 09:30 AM, James Sharrett wrote:
>> I have a function that generates a table of records and then a SQL
>> statement that does a COPY into a text file. I want to return the
>> n
I have a function that generates a table of records and then a SQL statement
that does a COPY into a text file. I want to return the number of records
output into the text file from my function. The number of rows in the table
is not necessarily the number of rows in the file due to summarization
> I'm trying to define a trigger function that looks for changes in table A
> (table the trigger for the function is on) and write a delta record into table
> B. So if a record has a value of 100 in table A, and it is updated to 50, the
> function should write 50 in table B. I can get the trigger
I'm trying to define a trigger function that looks for changes in table A
(table the trigger for the function is on) and write a delta record into
table B. So if a record has a value of 100 in table A, and it is updated to
50, the function should write 50 in table B. I can get the trigger to work
I have a PG function ( using plpgsql) that calls a number of sub functions
also in plpgsql. I have two main problems that seem to be variations on the
same theme of running dynamic SQL from a variable with the EXECUTE statement
and returning the results back to a variable defined in the calling
fu
I have a PG function ( using plpgsql) that calls a number of sub functions
also in plpgsql. I have two main problems that seem to be variations on the
same theme of running dynamic SQL from a variable with the EXECUTE statement
and returning the results back to a variable defined in the calling
fu
12 matches
Mail list logo