> On 2010-01-11, gher...@fmed.uba.ar wrote:
>
>> So, i come with this:
>> SELECT regexp_replace(
>> formato, E'{([^.]*)\.([a-zA-Z0-9]*)},
>> valores_sustitucion(ARRAY[E'\\1'::varchar,E'\\2'::varchar]),
>> 'g')
>> from table where id =1;
>
> select valores_sustitucion(ARRAY[E'\
> On 2010-01-11, gher...@fmed.uba.ar wrote:
>
>> CREATE FUNCTION valores_sustitucion(valor_ingresado varchar[])
>> returns varchar
>> as
>> $$
>> select case
>> $1[1] when 'Action_1' then
>> (select descripcion from load_by_cod($1[2]))
>>
>>when 'Action_2' then (select descripcion from p
Hi all. Im having a hard time here. Really have no idea what is wrong here.
Facing a special case of text substitution, i have to parse a column like
this one:
SELECT formato from table where id=1;
{Action_1.842}{Action_2.921}[truncated]
The numbers at the rigth of the period identifies an argum
> gher...@fmed.uba.ar wrote:
>
>> Oh, that looks promising. I wrongly supposed that RETURNING SETOF RECORD
>> forces the use of OUT parameters. I will give your idea a try.
>
> Tom Lane's point about using a refcursor is (unsurprisingly) a good one.
> If you return a refcursor from your function, y
> Gerardo Herzig wrote:
>
>> 1) There is a way to make a function returning "any amount of any type
>> of arguments"?
>
> RETURNS SETOF RECORD
>
> The application must, however, know what columns will be output by the
> function ahead of time and call it using an explicit column declaration
> list.
> On Wed, Oct 29, 2008 at 7:24 PM, Scott Marlowe <[EMAIL PROTECTED]>
> wrote:
>
> Oh, and to reply to myself and the original poster, you need to figure
> out what's causing the pages to get damaged. IT's usually bad
> hardware, then a buggy driver, then a buggy kernel / OS that can cause
> it. R
> On Wed, Oct 29, 2008 at 6:36 PM, Tom Lane <[EMAIL PROTECTED]> wrote:
>> "Scott Marlowe" <[EMAIL PROTECTED]> writes:
>>> On Wed, Oct 29, 2008 at 4:23 PM, Tom Lane <[EMAIL PROTECTED]> wrote:
If you can tolerate losing the data on that page, just zero out the
entire 8K page. dd from /dev/
Hi all. I've seen this searching in google. After a select on a table, i
got this:
ERROR: invalid page header in block 399 of relation "xxx"
I read about a tool called pg_filedump, and after some searchs about its
usage, i execute
pg_filedump $PG_DATA/base/xx/1234 (1234 is the oid of table xxx)
A
Hi dudes. Im trying to find out how to deal with this. I just receive a
1.2 MB wal file (may some 'windows home version' do that?), and obviosly,
when i try to recovery from there, get the 'incorrect file size' error.
Acording to the docs, wal file size can be changed at compile time. Not so
bad, i
>
> On Jan 7, 2008, at 7:19 AM, Gerardo Herzig wrote:
>
>> Hi all. Im having some fun trying to write my own replication
>> system using python. I will use the postgres own WAL archiving to
>> write the files, then my app will read them and do some stuff. As
>> im not a C programmer, im stuck in t
> On 8/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Hi all. Can i make a FK who points a table in a different schema? Or
>> this
>> is implemented via a trigger by my own?
>
> Sure. just prefix the table name with the schemaname and a .
>
> create schema abc;
> alter user me set search_p
Hi all. Can i make a FK who points a table in a different schema? Or this
is implemented via a trigger by my own?
Thanks!
Gerardo
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail
Thanks all you guys. Indeed, populating the tables with 10.000 entrys make
the things different, and now it uses all the indexes as i spect. It was
just a matter of being pacient and loading more data to test it out and
see.
And, yes, i need to upgrade psql now. Actually the real server has an
8.2
Well, im wondering if is possible using LIKE '%blah%', even better would be
upper/lower(string) like '%blah%',
Im not at work right now, i will try it latter and makes you know about
the results of using tsearch indexing.
Thanks a lot, man!
Gerardo
> On Tue, Mar 06, 2007 at 06:34:23PM -0300, Gera
Im using pg 8.0. I personally dont have problem in using pl/perl, but none
of my companions is a perl programmer, so i guess the IF..THEN seems to be
an easy (altough not preferable) solution.
Thank you very much Michael.
Gerardo
> On Mon, Sep 12, 2005 at 12:21:22PM -0300, [EMAIL PROTECTED] wrote
Hi all. I have troubles trying to achieve this assignment:
suppose the
type mycolumn as (field1, varchar, field2 varchar)
and
field_name = ''field1''
and returnValue declared as mycolumn
...
can i say returnValue.$field_name = ''ok''?
There is a way to achieve this piece of code?
Thanks a lot!
Suppose this python structure:
someDict = {
'field1': 'Foo',
'creepyfield': 'Bar'
}
and the connection to the database
CONN = pg.connect()
I want some pypgslq function
CREATE myfunction ( __dictionary__) returns void
AS
(process)
LANGUAGE pythonu
an
Hi all. Im a python programer, and im trying to use a dictionary
(associative array on Perl) in my pypgsql function without result. Anybody
know if it is possible?
Thanks a lot folks.
--
Gerardo Herzig
Direccion General de Organizacion y Sistemas
Facultad de Medicina
U.B.A.
-
Oh...to bad...Thank you Michael!
Did someone know if it can be acomplished in pypgsql?
Thanks againg falks.
Gerardo
> On Fri, Jul 29, 2005 at 10:36:52AM -0300, [EMAIL PROTECTED] wrote:
>> EXCEPTION
>> WHEN OTHER THEN
>> EXECUTE exception_handler(Exception_code)
>>
>> how do i get that error_
Hi all: I want to call some FUNCTION , let say
exception_hanler(Exception_code) for any exception in plsql functions. I
give some pseudo code to explain myself better:
CREATE FUNCION something(...) returns ...
AS
'
...
EXCEPTION
WHEN OTHER THEN
EXECUTE exception_handler(Exception_code)
...
20 matches
Mail list logo