Thread: Stalled post to pgsql-general
Hello: First of all, forgive me if this is not the appropiate list for my problem. What happens is: 6.5.0 running whitout problem for a very long time. Suddenly: select * from aliases where alias ~'claudia.gonzalez' \g alias |receptores ----------------+---------- claudia.gonzalez|claudia (1 row) BUT: select * from aliases where alias ='claudia.gonzalez' \g alias|receptores -----+---------- (0 rows) Also: select * from aliases where alias~'^claudia.gonzalez$' \g alias|receptores -----+---------- (0 rows) select * from aliases where alias~'claudia.gonzalez$' \g alias |receptores ----------------+---------- claudia.gonzalez|claudia (1 row) Seems like there is some kind of unvisible char at the front. Any ideas? TIA! Fernando P. Schapachnik Administración de la red VIA NET.WORKS ARGENTINA S.A. fschapachnik@vianetworks.com.ar
will post to proper group, sorry
On Mon, Mar 2, 2009 at 8:10 AM, <pgsql-general-owner@postgresql.org> wrote:
Your message to pgsql-general has been delayed, and requires the approval
of the moderators, for the following reason(s):
The author (K D <keithdutton@gmail.com>)
is not a member of any of the restrict_post groups.
If you do not wish the message to be posted, or have other concerns,
please send a message to the list owners at the following address:
pgsql-general-owner@postgresql.org
---------- Forwarded message ----------
From: K D <keithdutton@gmail.com>
To: pgsql-general@postgresql.org
Date: Mon, 2 Mar 2009 08:10:20 -0800
Subject: plpython large result set
Hello,
I am hoping to use plpython to perform various transforms on query results of very large size.
The documentation in the official 8.3 manual makes it appear as if the results of plpy.execute are read in at once (e.g., they appear to have random access and are mutable) rather than in the hidden cursor fashion of looping through a PgSql query result set. If this correct? If so does it mean that I need to avoid plpy.execute for very large queries? If so, a cursor/generator interface would seem to be a substantial improvement for the future.
If I cannot use plpy.execute, is there some way to declare and use a standard cursor from within plpython? I can find nothing on this on the web, and my own experimentation has been fruitless. Any quick example would be hugely appreciated.
If none of the above works, my fallback will be to execute the query in PgSql, then within the fetch loop call a plpython procedure. This works as far as my testing has gone, but seems unfortunate.
Thanks,
Kevin
REPOST!
On Wed, Dec 1, 2010 at 8:34 PM, <pgsql-general-owner@postgresql.org> wrote:
Your message to pgsql-general has been delayed, and requires the approval
of the moderators, for the following reason(s):
The author (Samba <saasira@gmail.com>)
is not a member of any of the restrict_post groups.
If you do not wish the message to be posted, or have other concerns,
please send a message to the list owners at the following address:
pgsql-general-owner@postgresql.org
---------- Forwarded message ----------
From: Samba <saasira@gmail.com>
To: pgsql-general@postgresql.org
Date: Wed, 1 Dec 2010 20:33:09 +0530
Subject: plpgsql : looping over multidimensional array : getting NULL for subdimension
Hi all,
I'm trying to loop over a multidimensional array and find if any of the elements in a sub-dimensional array are matching some known criteria but facing issue with NULL for the sub arrays.
I have a data structure that looks like:
some_array VARCHAR[][] := '{{samba,sarath,sreenivas},{samba,mukhesh,pavan}}';
I'm trying to assign the individual sub arrays to other array elements like:
other-array VARCHAR[];
other_array=some_array[1];
and I'm expecting to get '{samba,sarath,sreenivas}' for index 1 and {samba,mukhesh,pavan} for index 2;
however, I'm getting NULL.
Can some one explain the way I can assign subarrays to other array elements plpgsql?
Thanks and Regards,
Samba
Samba <saasira@gmail.com> writes: > REPOST! Please fix the subject line to be something useful when you resend a message. >> I'm trying to assign the individual sub arrays to other array elements >> like: >> >> other-array VARCHAR[]; >> >> other_array=some_array[1]; >> >> and I'm expecting to get '{samba,sarath,sreenivas}' for index 1 and *{samba,mukhesh,pavan} >> *for index 2;* >> *however, I'm getting NULL. You need to use array slice syntax if you want to extract a sub-array rather than a single element. Try something like some_array[1:1]. See http://www.postgresql.org/docs/9.0/static/arrays.html#ARRAYS-ACCESSING regards, tom lane
Yes. Its working fine.
What i mean i created function to delete parts from table.Then i need to place it on pgagent.
i placed function in pagent
like this..
do $$
declare
job_id int;
begin
/* add a job and get its id: */
insert into
pgagent.pga_job (jobjclid, jobname)
values
(1 /*1=Routine Maintenance*/, 'part delete')
returning
jobid
into
job_id;
/* add a step to the job: */
insert into
pgagent.pga_jobstep (jstjobid, jstname, jstkind, jstcode, jstdbname)
values
( job_id,
'my step name',
's', /* sql step */
'do
$BODY$
BEGIN
perform delete_empty_parts();
end;
$BODY$', /* the sql to run */
'sakila' /* the name of the database to run the step against */
);
/* add a schedule to the job. This one runs every minute: */
insert into
pgagent.pga_schedule (jscjobid, jscname)
values
(job_id, 'my schedule name');
end $$;
it sprogramatic way..
excuted fine.where i need to find this job.Jobs section..?,if yes unable to see the job after excuted..please let me know where i need to excute and where it is place..
2.is their any chance place function in pgagent directly in diagramatic way ..?
like right click on job create job..
i think step-->defintion..
how to place it and can i select sql or batch..?
On Fri, Apr 3, 2015 at 3:50 PM, <pgsql-general-owner@postgresql.org> wrote:
Your message to pgsql-general has been delayed, and requires the approval
of the moderators, for the following reason(s):
The author (Ramesh T <rameshparnanditech@gmail.com>)
is not a member of any of the restrict_post groups.
If you do not wish the message to be posted, or have other concerns,
please send a message to the list owners at the following address:
pgsql-general-owner@postgresql.org
---------- Forwarded message ----------
From: Ramesh T <rameshparnanditech@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>, "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Cc:
Date: Fri, 3 Apr 2015 15:50:43 +0530
Subject: Re:The link is good.But What I am expecting the following link..Created Using pgAgent.in above link process they placed location of the script file at STEP DEFINTION TAB creation process..same way is there a chance to place creation of table or delete statements in pgAgent process..?my aim to create job is delete some null data from table dailyOn Fri, Apr 3, 2015 at 3:30 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:Pavel StehuleHiregards
http://stackoverflow.com/questions/4477301/creating-jobs-and-schedules-programatically-with-pgagent2015-04-03 11:27 GMT+02:00 Ramesh T <rameshparnanditech@gmail.com>:Hi ,How to create job in pgAgent.Where I need to place script in pgAgent..any helpAdvanced thanks...