On 2013-04-25, Mauricio Cruz wrote:
> declare
>
> aCad
> text[][]
>
> begin
>
> ...
>
> execute 'aCad:=aCad
> array[['||var1||','||var2||']]'
execute 'select array[['||var1||','||var2||']]' into acad;
--
⚂⚃ 100% natural
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
T
On Thu, Apr 25, 2013 at 9:17 AM, Mauricio Cruz wrote:
> execute 'aCad:=aCad array[['||var1||','||var2||']]'
What are you going to do using this construction
aCad:=aCad array[['||var1||','||var2||']]
?
I can not understand the meaning.
--
Kind regards,
Sergey Konoplev
Database and Software Con
"sergey kapustin" writes:
> The thing is, that if i one of the parameters is NULL, then string s becomes
> NULL also ( because NULL||"any string" = NULL) and as a result i get this
> error -
> ERROR: cannot EXECUTE a null querystring
quote_nullable() might help.
regards,
2008/11/25 Tk421 <[EMAIL PROTECTED]>:
> I've got a problem with a function: It receives two parameters, the first,
> the table name, and the second, a where condition. The function looks like
> this:
>
> DECLARE
> cod bigint;
> query TEXT;
>
> BEGIN
> query = 'SELECT codigo FRO
Tk421 <[EMAIL PROTECTED]> schrieb:
>I've got a problem with a function: It receives two parameters, the
> first, the table name, and the second, a where condition. The function
> looks like this:
>
>DECLARE
> cod bigint;
> query TEXT;
>
>BEGIN
> query = 'SELECT co
Thanks!
Chris
Original-Nachricht
> Datum: Fri, 9 May 2008 23:14:44 +1000
> Von: imad <[EMAIL PROTECTED]>
> An: "Christian Kindler" <[EMAIL PROTECTED]>
> Betreff: Re: [SQL] execute plpgsl like "normal" sql
> Anonymous blocks are n
Sabin Coanda <[EMAIL PROTECTED]> schrieb:
> Hi there,
>
> Is it possible to execute a system command from a function ? (e.g. bash )
Yes, of course, but you need an untrusted language like pl/perlU oder
plsh. http://plsh.projects.postgresql.org/
Andreas
--
Really, I'm not out to destroy Micros
On Dec 6, 2007, at 10:32 AM, Sabin Coanda wrote:
Hi there,
Is it possible to execute a system command from a function ? (e.g.
bash )
If you use one of the untrusted procedural languages (e.g. plperlu,
plpythonu, ...) you can.
Erik Jones
Software Developer | Emma®
[EMAIL PROTECTED]
800
Hello Dirk,
I have to disagree.
Your first update query is very low. It probably implies to run the sub
select statement for each row to be updated.
Following update statement is already much faster: (using UPDATE FROM)
update test_table
set mygroup= t.mygroup
from test_table as t
Hello Marc,
at first I tried to solve your update of the tables. The example you
gave should be done with an update statement like the following:
update test_table
set mygroup=(select t.mygroup
from test_table as t
where t.family = test_table.family
...
> When you say use rules to inject constants, how would I go about
> doing this? Could you maybe give a brief example?
create view tab1_dml as select * from tab1;
-- note:
-- CONSTANT1 = 8
-- CONSTANT2 = 15
create or replace rule tab1_insert as
on insert
to tab1_dml
do instead(
ins
> I was wondering if it is possible to set the 'context' for running an
> sql command
Oracle has a Context('varname') that returns the value of varname for
the session. to best of my knowledge pg has nothing like this.
> I guess bottom line, is it possible to execute a bunch of SQL
> statements
On Fri, Sep 30, 2005 at 03:59:06PM -0500, Thomas F. O'Connell wrote:
> Per the docs:
>
> "The results from SELECT commands are discarded by EXECUTE, and
> SELECT INTO is not currently supported within EXECUTE. So there is no
> way to extract a result from a dynamically-created SELECT using the
Per the docs:
"The results from SELECT commands are discarded by EXECUTE, and
SELECT INTO is not currently supported within EXECUTE. So there is no
way to extract a result from a dynamically-created SELECT using the
plain EXECUTE command. There are two other ways to do it, however:
one is
On Fri, 2005-09-30 at 02:34 -0600, Michael Fuhr wrote:
> On Fri, Sep 30, 2005 at 10:00:35AM +0200, Mario Splivalo wrote:
> > PgSql8.1beta2 gives me this:
> >
> > ERROR: EXECUTE of SELECT ... INTO is not implemented yet
> > CONTEXT: PL/pgSQL function "_rndbroj" line 5 at execute statement
>
> Co
On Fri, Sep 30, 2005 at 10:00:35AM +0200, Mario Splivalo wrote:
> PgSql8.1beta2 gives me this:
>
> ERROR: EXECUTE of SELECT ... INTO is not implemented yet
> CONTEXT: PL/pgSQL function "_rndbroj" line 5 at execute statement
Could you post a simple example of what you're trying to do? The
follo
Paul Hart <[EMAIL PROTECTED]> writes:
> In RDBMSs such as Oracle, stored PL/SQL functions run with the
> permissions of the user that creates the function. Users who are given
> EXECUTE privileges then call the function with the permissions of the
> creator of the function.
Use "SECURITY DEFINE
LR wrote:
Thank you for your answer.
Do you know the name of this package ?
Thx
Lilian
see contrib/dblink.
I'd highly recommend using 7.3 (finishing beta, soon to be a release
candidate) if you can. It is much better than the one in 7.2 and the syntax
has changed some.
Joe
---
> > Hi,
> >
> > When I'm connected to a postgreSQL db ( e.g. myDB ), how could I execute
> > "select * from myTable;" in an other db (e.g. myOtherDB).
> >
> > In other words, what is the postgreSQL equivalent of the MS SQL Server
> > statement "USE myOtherDB SELECT * FROM myTable" ?
>
> Stock postg
On Sat, Nov 09, 2002 at 17:51:40 +0100,
LR <[EMAIL PROTECTED]> wrote:
> Hi,
>
> When I'm connected to a postgreSQL db ( e.g. myDB ), how could I execute
> "select * from myTable;" in an other db (e.g. myOtherDB).
>
> In other words, what is the postgreSQL equivalent of the MS SQL Server
> state
"Josh Berkus" wrote:
>Folks,
>
>Can anybody tell me the syntax for sending the result of an EXECUTE to a
>variable within a PL/pgSQL function again? Jan Wieck posted it to the
>list this summer, but the "searchable list archives" are bogging down.
FOR variable IN EXECUTE ''SELECT ...''
On Sat, 25 Aug 2001 16:42, Zot O'Connor wrote:
> Christopher Sawtell wrote:
> > On Fri, 24 Aug 2001 06:52, Zot O'Connor wrote:
> > > Other SQL servers have the concept of stored procedures having
> > > different permissions.
> > >
> > > For instance a procedure that can update a table.
> > >
> > >
23 Aug 2001 11:52:25 -0700, Zot O'Connor
> Other SQL servers have the concept of stored procedures having different
> permissions.
>
> For instance a procedure that can update a table.
>
> Since a web site typically connects as the webuser (or equiv postgres
> user), I do not want to offer
Christopher Sawtell wrote:
>
> On Fri, 24 Aug 2001 06:52, Zot O'Connor wrote:
> > Other SQL servers have the concept of stored procedures having different
> > permissions.
> >
> > For instance a procedure that can update a table.
> >
> > Since a web site typically connects as the webuser (or equi
12 May 2001, datactrl wrote:
>
> > Date: Sat, 12 May 2001 10:23:39 +1000
> > From: datactrl <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: [SQL] execute client application from PL/pgSql
> >
> > Thank You Jeff,
> > What is phpPgAdmin
CTED]
> Subject: Re: [SQL] execute client application from PL/pgSql
>
> Thank You Jeff,
> What is phpPgAdmin and where can get it?
>
> Jack
>
> - Original Message -
> From: "Jeff MacDonald" <[EMAIL PROTECTED]>
> To: "Jack" <[EMAIL
Thank You Jeff,
What is phpPgAdmin and where can get it?
Jack
- Original Message -
From: "Jeff MacDonald" <[EMAIL PROTECTED]>
To: "Jack" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, May 12, 2001 2:28 AM
Subject: Re: [SQL] execute cl
Jack wrote:
>
> Is that possible to execute a client application from server site by
> PL/Pgsql, such as pg_dump? Because my client sites are running Windows OS,
> or is there any Windows version of all Client Applications come from
> PostGreSQL V7.1?
>
> Jack
>
> ---(e
you could hack the pg_dump bit out of phpPgAdmin
i think the license permits it.
just my 2 cents.
jeff
On Wed, 9 May 2001, Jack wrote:
> Date: Wed, 9 May 2001 09:45:46 +1000
> From: Jack <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [SQL] execute client application from PL/pgSql
>
>
29 matches
Mail list logo