Re: insert into plpython

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: fernando villarroel <bbddlinux(at)yahoo(dot)es>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: insert into plpython
Date: 2006-03-23 20:12:02
Message-ID: 20060323201202.GA8481@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

fernando villarroel escribió:
>
> > create or replace function ingreso(varchar) returns
> > text as $$
> > query="insert into cliente (nombre) values
> > ('%s')" % (args[0])
> > plpy.execute(query)
> > return query
> > $$ LANGUAGE 'plpythonu';
> >
> Hola Alvaro, no funciona se cae al crear la funcion:

Entonces escapa las comillas duplicandolas.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Julio Misael Gutierrez 2006-03-23 20:14:33 Fwd: Access97 a Postgresql
Previous Message fernando villarroel 2006-03-23 20:08:30 Re: insert into plpython