ate_series(0, 19) as t(f1);
?column?
2004-12-01
2004-12-02
2004-12-03
2004-12-04
2004-12-05
[...]
2004-12-20
(20 rows)
HTH,
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
alled the dblink functions into your database? See
README.dblink.
Joe
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
E tbl
SET f1 = encrypt(decrypt(f1, 'oldkey', 'aes'), 'newkey', 'aes');
Joe
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL
NULL;
?column?
--
t
(1 row)
Joe
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
ould be handled for an empty 1D array?
The point Markus is complaining about seems like it should
be easily fixable.
Well, "easily" is a relative term. My Postgres hacking neurons have
gotten kind of rusty lately -- but then maybe that was your underlying
point ;-)
Joe
In
Bruce Momjian wrote:
Joe Conway wrote:
Any thoughts on how this should be handled for an empty 1D array?
No one responed to this email, so I will try. Is this the one
dimmentional array you were talking about?
test=> select array_dims('{}'::integer[]);
A 1-D array of no elements is
'[1:0]={}', just as Joe shows ... or at least it would be except
for an overenthusiastic error check:
regression=# select '[1:0]={}' :: int[];
ERROR: upper bound cannot be less than lower bound
I think this should be a legal boundary case. In ge
ditional column that coded the
type of relationship, but couldn't figure out how to create the summary
since the coded column has to be used to add the count to either the
"subs" or "items" columns (or subcolumns by type).
Thanks for any suggestions and comments.
Joe
---(end of broadcast)---
TIP 6: explain analyze is your friend
end
AS A1 from t1 group by g;
g |a1
---+---
1 | 0.923076923076923
0 | 0
(2 rows)
HTH,
Joe
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-no
rec.table_name;
EXECUTE sql INTO startval;
IF startval IS NOT NULL THEN
sql := 'ALTER SEQUENCE ' || seqname || ' RESTART WITH ' ||
startval;
EXECUTE sql;
RAISE NOTICE '%', sql;
010-09-03
2 | 2010-09-04
2 | 2010-09-05
2 | 2010-09-06
2 | 2010-09-07
2 | 2010-09-08
(10 rows)
HTH,
Joe
--
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support
signature.asc
Description: OpenPGP digital signature
Hello,
I have a simple table-based queue system, and I'd looking for some advice on
improving my dequeue function. it boils down to:
SELECT id
FROM queue
WHERE
FOR UPDATE NOWAIT;
which works well, in that no item gets dequeued more that once. The issue,
however is that when a contention occurs,
o idea.
The error is because you are selecting from a set returning function in
the target list rather than the from clause. It should be more like:
SELECT * FROM crosstab(text, text) AS ( col1_name col1_type [, colN_name
> colN_type]* )
HTH,
Joe
--
Joe Conway
credativ LLC: http://www.creda
r with the -F option?
Sorry for having gone off-topic. I was just hoping something like \t
could be passed, too.
Try:
psql -A -t -U $DBUSER -d $DB -c "$QUERY" -F $'\t'
see:
man bash
HTH,
Joe
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
.,(N$)) as t(x))
?
It would be interesting to see how that compares performance-wise.
Joe
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
nd I'm sure there are HMAC functions available that
could be used in PL/Perl and/or PL/Python.
Joe
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
ount);
mystart := mystart + INTERVAL '1 minute';
mystop := mystop + INTERVAL '1 minute';
END LOOP;
END;
$$ LANGUAGE 'plpgsql' STABLE;
[cid:image002.jpg@01CA596B.59B9EC10]Joe R. Plugge
Database Administrator, West Interactive Corporation
11650
il.com] On Behalf Of Brian
Modra
Sent: Friday, October 30, 2009 2:29 PM
To: Plugge, Joe R.
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Function Syntax Help
2009/10/30 Plugge, Joe R. mailto:jrplu...@west.com>>
I am trying to create a function that will grind through a cdr table and
p
7;1 minute';
newstop := newstop + INTERVAL '1 minute';
END LOOP;
END;
$$ LANGUAGE 'plpgsql' VOLATILE;
From: epai...@googlemail.com [mailto:epai...@googlemail.com] On Behalf Of Brian
Modra
Sent: Friday, October 30, 2009 2:46 PM
To: Plugge, Joe R.
Cc: pgsql-sql@
You may want to try Bucardo ... By performance, are you referring to latency?
If so, bandwidth between sites typically is the factor with latency in any
replication solution.
http://bucardo.org/
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgres
Mark,
Change your query to this:
SELECT id, count(*) FROM mytable GROUP BY id HAVING count(*) > 2;
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Mark Fenbers
Sent: Thursday, March 18, 2010 10:07 AM
To: pgsql-sql@postgresql
Johnf,
I would think that the _p, _test, _r etc are local variables within the
procedure/function and this is the way that the value (from the select) gets
assigned to that local variable.
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.or
I am trying to create a update trigger on a table that basically will only fire
when a specific column is updated. I am using version 8.4.3.
My plan of attack was to always fire on any row update, and pass in the OLD and
NEW column that I want to check.
CREATE TRIGGER check_lockout
AFTER U
Nevermind all, I figured it out
Thanks Dmitriy ...
From: Dmitriy Igrishin [mailto:dmit...@gmail.com]
Sent: Thursday, May 06, 2010 3:25 PM
To: Plugge, Joe R.
Subject: Re: [SQL] Column Specific Update Trigger Routine
Hey Plugge,
You dont need to pass OLD.* or NEW.* to the trigger function
ownerid = OLD.ownerid;
RETURN NEW;
END IF;
RETURN NULL; -- result is ignored since this is an AFTER trigger
END;
$$;
Thanks !!
From: Justin Graf [mailto:jus...@magwerks.com]
Sent: Thursday, May 06, 2010 3:59 PM
To: Plugge, Joe R.; pgsql-sql@postgresql.org
Subject
This is discussed in this Wiki:
http://wiki.postgresql.org/wiki/Grouping_Sets
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Hiltibidal, Rob
Sent: Wednesday, June 02, 2010 12:06 PM
To: Oliveiros; Wes James; pgsql-sql@postgr
You may want to try dblink.
http://www.postgresql.org/docs/current/static/dblink.html
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Shaun McCloud
Sent: Friday, December 03, 2010 10:51 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Union Question
Hell
Check out DB Solo ...
http://www.dbsolo.com/
Does both DDL compare as well as data compare.
From: pgsql-sql-ow...@postgresql.org [pgsql-sql-ow...@postgresql.org] On Behalf
Of manuel antonio ochoa [manuel8aalf...@gmail.com]
Sent: Wednesday, February 23, 2011 6:
Should match to the data type of the filtered value, so CHAR,VARCHAR,All DATE
TYPES should be quoted. INTEGER, BIGINT, SMALLINT should not
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Carlos Mennens
Sent: Thursday, Jan
1 - why two databases? Couldn't you have just created two separate SCHEMAS?
2 - if you insist on two separate databases:
http://www.postgresql.org/docs/9.2/static/dblink.html
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Kaleeswaran Velu
Sent: Tues
201 - 230 of 230 matches
Mail list logo