b' where id=nextval('cy30')::int;
UPDATE 30
B) update tc set des='c' where id=currval('cy30');
UPDATE 1
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Another version along that line ?
# create sequence counterseq start 1;
-- (set/reset whenever a counter is needed)
# select main_table.*, nextval('counterseq') as position2
into sorted_main_table
from main_table, keytable where main_table.id =
keytable.main_table_id
order by value;
pdate main_table set position = ( (select oid::int4 from temp_table
where id = main_table.id ) - (select min(oid::int4) from temp_table) + 1)
;
I read that oid wraps around (after ~ billions) so you might want to check
your current oid.
Regards,
Ben K.
Developer
h
n was Kashmira Patel.
Sorry, I apologize.
Regards,
Ben K.
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Jorge Godoy <[EMAIL PROTECTED]> wrote:
numbers. Is there any way to select a value from this column and return
it as an integer?
My twopence. I just happened to have the same problem with iReports for a
10 digit number - it may be case specific but in my case
# select ... int4(id) ..
Current_user
Timestamp
"The Select Statement Submitted by the User"
http://www.postgresql.org/docs/8.1/static/plpgsql-trigger.html#PLPGSQL-TRIGGER-AUDIT-EXAMPLE
might be close to what you want.
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of
file '/tmp/penchal.out' for writing: no such file or directory..
_IF_ you're on linux it could be due to selinux. setenforce 0 might solve
the problem tempoarily. I would assume there should've been some existing
discussion threads. (setenforce 1 afterwards
tupple number seems overly assumptive.
If it works for you great, your example may then be useful as a short
cut, but I don't believe in leaving things to chance when programming.
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
ng(array(select name from city where
idstate = s.idstate order by name),',') from state s;
==
name | array_to_string
--+-
RP | Gramado,Port Alegre
SP | Osasco
* I see normal
t( $1 ) || '' (SELECT * FROM
links WHERE p= $2 )''
CONTEXT: PL/pgSQL function "traverse" line 10 at execute statement
LINE 1: SELECT ''INSERT INTO '' || quote_ident( $1 ) || '' (SELECT ...
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
to deliver the
templist table name as argument. (Somehow there seemed to be a bug(?)
there)
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
ns over keeping one more field.
But I think this is more of an exercise, and functions would be the proper
way for complex operations.
Regards,
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
,50);
-- TRAVERSE
begin;
declare mc cursor for select * from linkedlist order by nextnode;
fetch 1 from mc;
fetch 1 from mc;
...
close mc;
commit;
which is nothing more than,
select * from linkedlist order by nextnode;
Regards,
Ben K.
Developer
http://benix.tamu.edu
above query included indexes too (relkind=i) while
information_schema.tables included only tables and views (r,v).
Ben K.
Developer
http://benix.tamu.edu
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
14 matches
Mail list logo