Hi,
I have to execute commit for evey record that i processed during a cursor fetch
in a function.
There is a way to do it?
Thanks in advance.
Luke.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Hi,
I need to execute COMMIT in a function pgsql,
there is a way?
Can I have any example?
Thanks in advance.
Luke.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Hi,
I have a problem in a function pgsql with Reading TIMESTAMP calling the
function now()
the problem is this:
At the begin of function I read timestamp...
select now() into TS_BEGIN;
the function execute some statement...
Many seconds after I reread the timestamp
select now() into TS_END;
and
Please, remove my address from this Mailing List.
thanks
--
Leggi GRATIS le tue mail con il telefonino i-mode di Wind
http://i-mode.wind.it/
Hi List,
I have one table something like this
Name Age
=
tom 20
ram 25
shyam 30
balram15
hari 10
Now i want serial number of a record.
Suppose if i will fire a query "select Name from tablename where age=30".
it will give outp
If you use a btree index on the column, you should be able to use it in
the like:
http://www.postgresql.org/docs/8.1/interactive/indexes-types.html.
---(end of broadcast)---
TIP 6: explain analyze is your friend
>Well thats it if you use only *single column* Foreign keys.
>In the general case the above will need extra work.
Are you sure? I have tested query with 3 table with multiple FK and
it works (see below) [as you can see
"C" table have two FK to A and B]
test=> SELECT
test-> (SELECT relname FRO
>
>SELECT c1.relname,c2.relname from pg_constraint cons,pg_class c1,
pg_class
>c2 where cons.conrelid=c1.oid and cons.confrelid = c2.oid;
>
>for column(s) names you will have to do extra homework.
Thanks! I have obtained my query! Here is:
SELECT
(SELECT relname FROM pg_catalog.pg_class WHE
> pg_catalog.pg_constraint is your (only?) friend.
I have already examintated this table without results. Seem not to be
a "human-readable" table :(
TIA
Roberto Colmegna
Tiscali ADSL 4 Mega Flat
Naviga senza limiti con l'unica Adsl a 4 Mega di velocità a soli 19,95
Hi,
supposing to have a small DB:
TABLE a (
id SERIAL PRIMARY KEY
);
TABLE b (
id SERIAL PRIMARY KEY,
idA INTEGER NOT NULL REFERENCES a(id)
);
How can I inspect pg_schema/information_schema to "detect" the
relation between "b" and "a" via "idB"?
TIA
Roberto Colmegna
tool that I can use to copy views as-is
from one database into another?
Kind Regards,
Lennie De Villiers
Java Developer
CorePat Systems (Pty) Ltd
www.corepat.com
mail2web - Check your email from the web at
thanks, christoph. i did go ahead and retool all the tables, but glad
to know about the casting option.
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
I have a database with several tables that use timestamp without time
zone type. I upgraded from an older pgsql and have code that does not
expect the precision in the select output. Is there a way I can get the
effect of zero precision without modifying all the tables?
The docs say it usees "defa
of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Michael Sterling wrote:
i'm trying to get the max time stamp, from each day, of a range of
dates, not just the max time stamp for the complete range dates but
for each day.
I don't trust the news client I was using. So will answer again from
the Netscape version; This worked for me:
I have a ta
) the union of the two columns
3) questions
a) is a query like this possible that can give me the desired result
b) if so what would it be.
4) remarks
i can get the solution using a temporary table and with repeated
"insert into temporary select $column from main_table"
sults on google
thanks in advance
ashok
----
mail2web - Check your email from the web at
http://mail2web.com/ .
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
Hi,
| You probably don't want to do that. The DESC only applies to the
| one expression it follows. What you want is probably:
| explain select datetime,id from trafficlogs order by
| datetime desc,id desc limit 20;
This is exactly what I was after - worked a treat!
Thanks.
Darren
-
You might also consider using ecpg which allows a syntax like:
int a, b, c;
EXEC SQL INSERT INTO mytable ( :a, :b, :c );
See http://www.postgresql.org/docs/current/interactive/ecpg.html for
details.
HTH
Jürgen
Viorel Dragomir <[EMAIL PROTECTED]> schrieb am 29.01.2004, 14:11:44:
>
--(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
At 20:55 12/13/2003, you wrote:
On Sat, 13 Dec 2003, [EMAIL PROTECTED] wrote:
> Hi
>
> I have some problem with INHERITS and foreign keys. I do not know if I have
> not got the clue or not. Anyway I have tried to simplify the problem so
> that you can guide me on the right trac
through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
Hi,
Thanks for the several replies both on and off the list.
To be more specific, I am wanting to aggregate data to a 5/10/15 min
interval. Currently, I am aggregating data that falls in hour / day /
month / year periods for both count() and sum(). The sql I am currently
using is:
SELECT count(
Hi All,
I am wanting to perform the equivalent of date_trunc to 5/10/15 minute
intervals. As this does mnot seem to be natively supported by
date_trunc, can anyone point me in the right direction to possible write
the SQL ro acheive the desired outcome?
Tia,
Darren
---(e
eko?
Hacé click aquí: http://www.keko.com.ar
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
On Mon, 23 Dec 2002, [iso-8859-1] [EMAIL PROTECTED] wrote:
>
>
>
> first of all, thanx for anyone who answered my previous question... i've understood
>what was wrong...
> now, i've got another question, i know it could sound stupid, but i have not such a
&
first of all, thanx for anyone who answered my previous question... i've understood
what was wrong...
now, i've got another question, i know it could sound stupid, but i have not such a
great practice with postgres. i'm asking you: is it that a way to save values from a
view?
i'm
can i do to solve this problem?
thanx in advance for your help
massimo
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
i created index already. how can i decrease the query time more.
number of record is over 1 million.
the following is the query plan.
Group (cost=34082.59..34085.62 rows=61 width=112)
-> Sort (cost=34082.59..34082.59 rows=607 width=112)
-> Nested Loop (cost=0.00..34054.51 rows=607 width=112)
->
1
AND c.is_active = 1
GROUP BY b.screen_id, b.name
ORDER BY b.screen_id
many thx!
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Hi everibody,
i have installed Postgres 7.2.2 from a tarball, but using psql i can not
have the history of the last command.
When i used Postgres from rpm this useful element worked very well!
Why that?
Best Regards
Massimo Arnaudo
---(end of broadcast)--
Hi,
Let say I have 2 Product table, both of them has
columns ProductID and Price
What is the update command if I want to update
all Prices of first table to be equal with Price in second
table?
Please Help.
Yudie
Hi,
Let say I have 2 Product table, both of them has
columns ProductID and Price
What is the update command if I want to update
all Prices of first table to be equal with Price in second
table?
Please Help.
Yudie
Hi,
I have 2 major problems bothering me and probably u
are the best person to help me out :-
1)
Well I read one of ur solutions to sending more
tham 16 parameters to a function in plpgsql. I have changed the value of
FUNC_MAX_ARGS (a/k/a INDEX_MAX_KEYS) in
\usr\local\plpgsql\include\c
r joins before the explicit
outers or do all explicits occur first?
Thank you.
Eric Nielsen
----
mail2web - Check your email from the web at
http://mail2web.com/ .
---(end of broadcast)-
Hi ,
I read one of solution to andreas problem of how to set autocommit off but
my problem still persists. I am basically writing a function in plpgsql
language which performs a number of update and insert statements but on a
failing condition it rollbacks inorder to maintain integrity in the
d
t; thanx in advance.
>
> guru.
> bk SYSTEMS (P) Ltd.
> P . N . G U R U P R A S A D
> ---
>
>
>
>
>
>
ld be greatly appreciated.
I am also including a list of related characters. This email is going
out with 8859-1 as the charset, so I hope you are able to view them.
UPPER CASE:
192: À (0xc0) 193: Á (0xc1) 194: Â (0xc2) 195: Ã (0xc3)
196: Ä (0xc4) 197: Å (0xc5) 198: Æ (0xc6) 199: Ç (0xc7)
2
broadcast)---
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
>
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
ted.
>
> Thanks,
>
> Mark
>
>
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
>
-------(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
adcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
t; When I use age() I don't get full years. Is there an easy way to round
> ::reltime off or up without writing a function. Is there any possibility
> to use plain SQL only?
>
> Hans
>
>
> ---(end of broadcast)----
; to eliminate the column).
> >
> > RIght now, I'm copying the file to a Win32 machine and using MS Word
> > for the search-and-replace, but I'm sure there's got to be a better way
> > ... *without* learning VI or Emacs. Help?
> >
> >
3 | Sam
>
> result:
> a.id | b.name
> -
> 1 | Tom
> 2 | NULL
>
> thank you in advance
>
> Algirdas ©akmanas
> IT manager
> +370 99 90369
> [EMAIL PROTECTED]
> Grafton Entertainment
> http://www.tvnet.lt
>
>
>
and noticed your comment about having tried || already
> - I must learn to read messages fully...
>
> But, I did wonder if the semicolon ";" at the end of the for loop is
> what is causing your problem? The syntax explanation I have does not
> show the ";", therefore it
nction"
>
> where i must enable MultiByte strings (MB) ??
>
> Nizomi
>
> ---(end of broadcast)---
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to [EMAIL PROTECT
nsert a "\" before each special character? And what range
> of characters will need this handling?
>
> Thanks,
>
> Markus
>
> ---(end of broadcast)---
> TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECT
Gabriel,
Two backslashes.
> select * from areas where titulo ~ '\\+' or titulo ~ '\\*'
Troy
>
> Hi fellows,
>
> I'm trying to the following query:
>
> select * from areas where titulo ~ '+' or titulo ~ '*'
>
> and the answer is:
>
> ERROR: regcomp failed with error repetition-operato
E.g.
create table mytable (created datetime);
insert into mytable values ('01-01-2001');
...
insert into mytable values ('01-31-2001');
select created from mytable where date_part('dow', created) = 7 and date_part('month',
created) = 1;
Troy
>
> i want to select date in january where day='S
Just a wild guess, but I would imagine
a corrupt (old) index on the userid field would
cause this kind of behavior.
You could test this by dropping the index and
then rebuilding it.
Troy
>
> "pgsql-sql" <[EMAIL PROTECTED]> writes:
> > migrate=# select us
What's the meaning of the "REMINDER from pgsql ..."
message?
I checked the page, and apparently everybody on the
list got the message.
Should we accept or reject the action?
Troy
Large objects are not dumped. It should be
in the documentation for large objects.
You need to write a script which writes them to
disk and then imports them back in after you have
installed your dbs.
Troy
>
>
> I need to move a DB from Pg 6.5 to 7 haw can i export Large Object to the
> ne
MTcW:
Pick the database which allows your programmers
to get the job done. If the system is too slow, find out
if there are ways you could speed it up, and then if that
doesn't make you happy, get a faster server.
In my opinion it's not worth making the programmer's life
more difficult to go w
Richard,
Please correct me if I am wrong.
You want to do something like:
select $1 from captives where firstname ~ '^(R[^ \t,]*d)$';
And get as result:
lastname
Richard
Richard
Richard
Ricard
Richard
Rolland
Richard
In this case, the above query is same as:
select firstname from captives whe
Not quite sure what you mean, but how about this:
select date_part('day', 'Jul 01 00:00:00 2000 PDT'::datetime-1);
You must specify Jul for June, i.e. always the following month.
You could get around that too, but since I don't know why you
need to do what you asked, I'll leave it at this.
Tr
E.g.
select workgroup from job group by workgroup;
will that do?
Troy
>
> Ok, if I want to use group by, then I have to put every select field
> afterwards to group by. But I do want to group by one field.
> Hence
> select workgroup,id from job group by workgroup,id;
> would create groups o
Joern,
select myfield from tablea where lower(myfield) = 'mysearch';
or
select myfield from tablea where myfield ~* 'mysearch';
Troy
>
> Hello together,
>
> how can I handle case insensitive search in a table?
>
>
>
> --
> Linux is like wigwam - no windows, no gates, apache inside.
> In
57 matches
Mail list logo