r than individual transactions.
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Softwarehttp://pervasive.com512-569-9461
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your des
Is this possible?
> >
> > Sure, given a suitable schema
> >
> > It is not clear to me, if the hours worked are
> > to be found in the same table you want to insert
> > into, or not.
> >
> > gnari
> >
> >
> >
> >
--
Jim C.
lect t1.id from t1, t2 where t1.id = t2.id and t2.id = x
>
> or more correctly, based on the OP's example:
>
> select t2.x from t1, t2 where t1.id = t2.id and t1.id =
Actually, I think you want AND t2.x , not t1.id.
BTW, I recommend not using id as a bareword field name. Very easy
e useful to toss a NOTICE
or maybe even WARNING when a serial is created without a unique
constraint of some kind?
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512
rry... It
I don't think either assertion is true. I'd bet most of the developers
actually do normally use an index on a serial, since it's normally used
as a PK. And while people can be a bit terse with their replies, I
wouldn't say you were blasted. :)
--
Jim C. Nasby,
s the only examples in
> chapter 35. There is a paragraph in there suggesting you go look at
> the PL languages first, but obviously it's not getting the job done.
Chapter 35 is plpgsql.. do you mean chapter 32.4?
> Anybody have a better idea?
What about a See Also section a
y time
> increased compare to say select a,b from tableA.
>
> any help, prettymuch appreciated.
>
>
> ---(end of broadcast)---
> TIP 5: don't forget to increase your free space map settings
>
--
Jim C. Nasby, Sr.
worthless - it works fine for many
> people. But it does have limitations.
And you can easily have multi-master syncronous replication in
PostgreSQL using the same idea; just see pgCluster.
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software
NULL
You might have to do the NULL check in a HAVING clause instead... try
it.
BTW, this is probably better asked on pgsql-sql.
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive
broadcast)-----------
> TIP 2: Don't 'kill -9' the postmaster
>
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/perv
ommand that can do that?
> >
> > Cluster does that. Vacuum only cleans dead tuples from the tables.
>
> Note that while reordering, CLUSTER also gets rid of dead tuples, so if
> you cluster you don't need to vacuum.
It also does a REINDEX...
--
Jim C. Nasby, Sr. Engineering C
dead tuples, so if
> >>you cluster you don't need to vacuum.
> >
> >It also does a REINDEX...
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasb
ompany - Command Prompt, Inc.
>
> ---(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
>
--
Jim C. N
t addicted, is all.
>
> A
>
> --
> Andrew Sullivan | [EMAIL PROTECTED]
> Information security isn't a technological problem. It's an economics
> problem.
> --Bruce Schneier
>
> -----------(end of broadcast)---
> TIP
fied, hist.modified
> as
> hist_modified, coalesce(hist.etc, curr.etc) as etc FROM curr LEFT OUTER JOIN
> hist ON(curr.id = hist.curr_id) WHERE ...
>
> I'm really stuck here. It seems to me that I need a lot of
> CASE...WHEN...ELSE.. statements in the query, but
id ) FROM bookmarks;
> array_accum
> ---
> {1,2,3,4,5,7}
Couldn't you just use array()?
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/
select T.* from quality_control_reset T inner join
> (select qualitycontrolrange, max(date) as date from quality_control_reset
> group by qualitycontrolrange) T2
> on (T.qualitycontrolrange = T2.qualitycontrolrange and T.date=T2.date);
BTW, I believe the new row operator fixes in 8.2
, you should link a band to a track, not an album.
> This opens another can of worms...
>
> I would use the following tables :
BTW, if you're going to be writing code to manage stuff like this, you
should absolutely check out the source for http://musicbrainz.or
CT max(greatest(column_a, column_b) ...
SELECT min(least(column_a, column_b) ...
There may be a difference in performance between the two.
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://ji
Because of this I *always* prefix plpgsql variables with
something, such as p_ for parameters and v_ for general variables.
--
Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED]
Pervasive Software http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/perva
ystem more usable if the parser tried to apply a heuristic rule
> about some occurrences being meant as variable references and other ones
> not. If the rule ever got it wrong, it'd be even more confusing.
BTW, I believe SELECT investment_products.provider_id would work here,
but I'm
chaber | Logical Tracking&Tracing International AG
> Dipl. Inf. | Software Development GIS
>
> Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
>
> ---(end of broadcast)-------
> TIP 4: Have you searched ou
ftp://candle.pha.pa.us/pub/postgresql/mypatches/checkfile.*
>
> Let me know if you want details.
Is it able to also delete the cruft? Seems to be a useful extension,
especially on windows, which AFAIK doesn't have an equivalent to ``.
--
Jim C. Nasby, Sr. Engineering Consultant
rently.
>
> You should be able to do this with a fairly simple self-join...
>
> select a.id, b.aid, a.field1, b.field1
> from mytable a
> join mytable b
> on (a.id=b.aid)
>
> Or something like that.
>
> ---(end of broadcast)---
> T
other consideration is that the free space map doesn't care too much
for tracking space info on tons of small tables.
Perhaps the biggest issue is: what happens when you need to do DDL? If
you have 1000 schemas that should be identical, you'll need to perform
any DDL 1000 times.
But as
11 22 33
>
>
> I was expecting doc_num would receive twice the C1 value, just like with a
> normal sql join.
>
> Regards,
>
> --
> Philippe Lang, Ing. Dipl. EPFL
> Attik System
> rte de la Fonderie
On Fri, Sep 29, 2006 at 12:37:56AM +0200, tomcask o_o wrote:
> Hi
>
> in advance, sorry for my english.
>
> in a Web server as is the best option?
>
> to accede to db to show the contents or to accede to static files modified
> by scripts when the content of db has been modified.
>
> That the
On Mon, Oct 09, 2006 at 02:57:28PM -0500, Aaron Bono wrote:
> On 10/5/06, Jim Nasby <[EMAIL PROTECTED]> wrote:
> >
> >On Oct 5, 2006, at 11:50 AM, Tom Lane wrote:
> >> regression=# select ('2006-09-15 23:59:00'::timestamp - '2006-09-01
> >> 09:30:41'::timestamp);
> >> ?column?
> >> ---
On Tue, Oct 10, 2006 at 03:21:36PM -0400, [EMAIL PROTECTED] wrote:
> Everyone,
>
> I've written a function (language = sql) which uses a temporary table to
> simplify the process; however, when I go to load the function I get:
>
> /var/lib/pgsql$cat thm.sql | psql test
> ERROR: relation "lost_b
Moving to -sql.
On Wed, Oct 18, 2006 at 06:53:46PM +0530, Indira Muthuswamy wrote:
> Hai,
>
> I have encountered a problem with PostgreSQL.I have created a table
> 'tab1' with a column 'a' with serial type.I entered 20 records into the
> table.So the query
> select max(a) from tab1;
> returned 2
Search the archives for hierarchical query.
--
Jim Nasby[EMAIL PROTECTED]
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
See section 9.12 of the docs.
On Thu, Oct 19, 2006 at 12:28:58PM +0530, Indira Muthuswamy wrote:
> Then how do we clear the values of a serial column(is it done only by
> dropping the column?)?
>
> Regards,
> M.Indira
>
>
>
> On 10/19/06, Jim C. Nasby <[EMAIL PR
On Thu, Oct 19, 2006 at 01:51:55PM +0200, Mezei Zolt??n wrote:
>
> Hi,
> I didn't really know what subject I should give.
> I have a table like this one:
> 2006.10.01.Bela10
> 2006.10.01.Aladar9
> 2006.10.01.Cecil8
> 2006.10.01.Dezso7
> 2006.10.01.Elemer6
>
On Sun, Oct 22, 2006 at 12:03:38AM +0300, Devrim GUNDUZ wrote:
> On Tue, 2006-10-17 at 14:21 +0530, Sandeep Kumar Jakkaraju wrote:
> > Can we convert from Postgres to Oracle !!???
You can also run our software and get Oracle syntax for 1/25th the cost.
--
Jim Nasby
Moving to -general (and please start a new thread instead of hijacking
an existing one).
On Thu, Nov 02, 2006 at 01:14:22PM -0500, louis gonzales wrote:
> Hello all,
> Is there an existing mechanism is postgresql that can automatically
> increment/decrement on a daily basis w/out user interaction
Yes, but if it was '2004-01-02 01:00:00'-'2004-01-01 00:00:00' it should
return 25:00:00, not 1 day 1:00.
I agree with Tom that this should be changed; I'm just arguing that we
might well need a backwards-compatibility solution for a while. At the
very least we'd need to make this change very clea
On Tue, May 15, 2007 at 12:19:54PM -0500, Peter Hanson wrote:
> Hello,
>
> I was wondering if there's a fast way I can add "on delete cascade" to all
> foreign key constraints in my database? Maybe a quick update I can make
> against the catalog possibly? Or is there a way I can query for all f
37 matches
Mail list logo