--On Monday, October 16, 2006 09:53:56 -0400 Tom Lane <[EMAIL PROTECTED]> wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
In fact, more info to work with ... it likes the date, just not when I use it
as part of a SELECT query of a table ...
I suspect it's n
--On Sunday, October 15, 2006 23:27:34 -0400 Tom Lane <[EMAIL PROTECTED]> wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
More then one Record:
# select get_next_billing_date(activated, 12) from company_details;
ERROR: control reached end of function without RET
12) from company_details;
ERROR: control reached end of function without RETURN
CONTEXT: PL/pgSQL function "get_next_billing_date"
Something I've written wrong in the function, or just not something that is
doable?
Thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.h
ight allow this, but can't seem to figure
out a proper format for it ;(
If I have to write a function to do it, fine ... just wanted to make sure
I wasn't missing something first ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Emai
On Wed, 26 Jul 2006, Jim Buttafuoco wrote:
try
now() + (? || ' day')::interval
Perfect ... had thought of that, but put my ) after ::interval instead of
before ;(
Thx ...
-- Original Message ---
From: "Marc G. Fournier" <[EMAIL PROTECTED]>
To
I need to do:
NOW() + '2 day'::interval
where 2 is a variable ...
if I do:
NOW() + '? day'::interval
it, of course, takes the ? as a literal ... so is there some way I can do
this such that I can do the placeholder?
Thx
----
Marc G. Fournier Hub.Org Netwo
On Sun, 21 May 2006, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
I'm trying to figure out some way to speed up the following query:
select ps2.page_id, ps2.template_component_id, max(ps2.start_time)
from page_schedule ps2
where ps2.st
On Sun, 21 May 2006, Michael Glaesemann wrote:
On May 21, 2006, at 10:42 , Marc G. Fournier wrote:
-> Seq Scan on page_schedule ps2 (cost=0.00..2364.95 rows=33110
width=16) (actual time=0.021..623.363 rows=94798 loops=1)
I don't know about rewriting the query, but it appe
<= to just =, the index is
used, but that is expected ...
Is there some other way I can either write above query *or* do an index,
such that it will use the index?
thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . [EMAIL PROTECTE
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your
On Wed, 5 Apr 2006, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
I'm still searching through Google and whatnot, but not finding anything
off the bat ... is there some way of creating a 'REVERSE INDEX' on a
column in a table?
For instance,
verse order, so would need the INDEX to go from
'GREATEST to LOWEST', vs 'LOWEST to GREATEST' ...
Thx
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 761
27;ve checked CREATE TRIGGER, and that doesn't work 'ON SELECT' ... is
there anything that I *can* do, other then fire back an UPDATE based on
the records I've received?
Thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL P
was havin
gto figure out the 'active remark record' doing a 'max(create_time)' ...
On Wed, 4 Jan 2006, Marc G. Fournier wrote:
I'm not sure if I'm looking at (for) the right thing or not, but if I am,
then I'm not finding any useful examples :(
I
On Wed, 4 Jan 2006, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
Now, what I want to do is add a FOREIGN KEY (again, I think) that when
incident_summary.status is changed (either closed, or reopened), the
associated records in incident_comments are changed t
ld I be searching on / reading for this one? Pointers
preferred, especially one with some good examples :)
Thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
--
Is there a simpler way of doing this then:
select (date_part('epoch', now()) -
date_part('epoch', now() - '30 days'::interval)) / ( 5 * 60 );
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECT
On Wed, 26 Oct 2005, Michael Fuhr wrote:
On Wed, Oct 26, 2005 at 12:58:13AM -0300, Marc G. Fournier wrote:
Does anyone know of, or have, any comparisions of the overhead going with
something like pl/perl or pl/php vs using pl/pgsql?
Benchmark results will probably depend on the type of
Does anyone know of, or have, any comparisions of the overhead going with
something like pl/perl or pl/php vs using pl/pgsql?
Thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ
ble to find, I suspect I'm not going to have much of a choice ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
---(end of broadcast)---
On Tue, 25 Oct 2005, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
I know that the server knows that ADT == -0400, and AST == -0300 ...
Other way around isn't it? Unless Canada observes a pretty strange
variety of daylight saving time ;-)
I knew I
I know that the server knows that ADT == -0400, and AST == -0300 ... is
there any way of reversing that? Basically, I want to say:
SELECT timezone_str(-0400, 'not dst');
and have it return ADT ... I've got a method of doing it right now, using
a function, but just find it looks so messy, ju
Are there any data types that can hold pretty much any type of character?
UTF-16 isn't supported (or its missing from teh docs), and UTF-8 doesn't
appear to have a big enough range ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL
Moved off of -hackers, since its long gotten out of that realm :)
On Thu, 1 Sep 2005, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
On Mon, 29 Aug 2005, Tom Lane wrote:
No, because there's no built-in cast from smallint to bool.
'k, I just took
de of it) are considered one
transaction, can you do a begin/end within the function itself to 'force'
commit on a specific part of the function?
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy
ld be great) online?
Thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
---(end of broadcast)---
TIP 6: explain analyze is your friend
)[12]
);
Is it possible to create an INDEX on customers.monthly_balance such that I
could do something like:
SELECT * FROM customers WHERE monthly_balance[6] = 0.00;
As an example ... or
SELECT * FROM customers WHERE 0.00 = any (monthly_balance);
Marc G. Fournier Hub.Org Netw
id = table.timezone )) = '2004-12-12';
Something like this, but that works:
# select ( now() || ' ' || 'PST8PDT' )::timestamp;
ERROR: invalid input syntax for type timestamp: "2005-06-26 00:23:29.789703-03
PST8PDT"
Marc G. Fournier Hu
On Fri, 17 Jun 2005, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
Does that make sense? Would it ever get used?
It could get used if one of the two values is far less frequent than the
other. Personally I'd think about a partial index instead ...
H
Does that make sense? Would it ever get used? I can't see it, but
figured I'd ask ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
---(end of
Reading through the docs, both the CREATE VIEW and CREATE RULE pages refer
to how you can use a RULE to 'simulate' an updateable VIEW ... but I can't
seem to find any examples of this ...
Does anyone know of an online example of doing this that I can read
through?
Thanks .
Do to moderator error (namely, mine), several hundred messages (spread
across all the lists) were just approved ...
Sorry for all the incoming junk :(
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy
tserverload AS ("server_name" text, "load_avg" int4);
CREATE FUNCTION getserverload()
RETURNS tserverload
AS
'DECLARE
r tserverload%rowtype;
etc.
You would then return r, comprised of r.server_name and r.load_avg.
George
----- Original Message - From: &q
two fields of a
table, or, in the case of the above, one column and oen 'group by' column?
thanks ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED] Yahoo!: yscrappy ICQ: 7615664
I need to strip out all spaces, and all \' from a string ... is there an
easier way then doing:
select lower(replace(replace(name, ' ', ''), '\\\'', '')) from business;
Thanks ...
Marc G. Fournier Hub.Org Networking Ser
On thing I failed to note here, that is probably critical ... its a 7.3
database ...
On Sat, 9 Oct 2004, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
Have a table with two FKs on it ... 2 different fields in the table point
to the same field in another table .
On Sat, 9 Oct 2004, Tom Lane wrote:
"Marc G. Fournier" <[EMAIL PROTECTED]> writes:
Have a table with two FKs on it ... 2 different fields in the table point
to the same field in another table ...
When I do an 'EXPLAIN ANALYZE DELETE FROM table WHERE field = #;', it
n
le, to
make sure it exists ...
Is this correct? So, its effectively having to do 3278 "SELECTS" against
the REFERENCED table? (two fields have contraints on them, 1639 rows to be
deleted) ... ?
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
E
; is invalid
> inside the values part of the definition.
>
> SQL's language specification says otherwise, as does "\h insert" from the
> command line.
>
> The query stand-alone returns a table with values that are valid for the
> table I wish to insert into.
>
> Wh
that it
just skips over those records.
First thought would be to write a quite plpgsql function that would do a
SELECT first, to see if the value already exists, and if not, then do the
INSERT ... but am wondering if maybe there is a cleaner way that I'm not
thinking of?
----
Marc G
On Thu, 11 Dec 2003, Tom Lane wrote:
> "Marc G. Fournier" <[EMAIL PROTECTED]> writes:
> > So, I'm doing my LEFT JOIN wrong *somehow*, but its eluding me as to
> > what/how .. :(
>
> > ams=# select ct.ip_id, sum(ct.bytes) as traffic,
>
16900355
1088 | 246166684
1227 | 44816947957
1179 | 3867502285
(8 rows)
the storage/avg values come out right in the JOIN, but the traffic/sum
values get royally screwed ...
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]
http://www.hub.org
http://www.pghoster.com
http://www.commandprompt.com
On Thu, 6 Nov 2003, chester c young wrote:
> can anybody recomend web hosting that provides postgresql? I have
> found a couple, but their pricing is several times the going rate using mySql.
>
> ___
>From the docs, if you do:
traffic=# select CURRENT_TIMESTAMP(0);
timestamptz
2003-10-13 11:04:09-03
(1 row)
the 0 reduces the precision of the time to get rid of the microseconds ...
is there a way of having this done by default on, if anything, a per
connection
In theory, the news2mail gateway is back in place ...
---(end of broadcast)---
TIP 8: explain analyze is your friend
Morning all ...
Josh Berkus the other day shook my cage a bit and reminded me to
create the -performance list that had been discussed awhile back ... so I
did :)
[EMAIL PROTECTED]
or
comp.databases.postgresql.performance
archives wont' show it up yet,
Finally figuring that enough is enough, I've been spending the past few
days working on the list archives ...
I've reformatted, so far, the following lists into a cleaner format:
pgsql-hackers
pgsql-sql
pgsql-bugs
pgsql-general
pgadmin-hackers
pga
47 matches
Mail list logo