11,952549,129124,446671,476345,168905,308274,404812,501024,738098,636071}
(1 row)
I now [know] why it happens an[d] how [to] avoid it, but it's ok?
Must work like this?
Yes and yes. LIMIT applies to the number of rows, and that's how it's
documented.
http://www.postgresql.org/docs/9.0/interactive/queries-limit.html
--
Lew
--
Sent via pgsql
Please do not top-post.
On 08/05/2010 09:42 AM, Ketema Harris wrote:
Never kill -9. Use kill -INT, whatever signal num that is, 11?
man kill
INT2
SEGV 11
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
be at the same address, if anywhere.
That's because a C pointer doesn't represent a struct, or anything else other
than an address. It *points to* the struct.
You need to serialize the struct itself then allocate the pointer when you
deserialize the struct.
--
Lew
--
Sent via pgsql-general mailing
of the google groups email system.
Thomas Kellerer wrote:
I read it through the gmane newsreader, so I get threaded display and
can easily scan the subjects.
Ditto Thunderbird's news reader.
Google Groups is not a very good news reader.
--
Lew
--
Sent via pgsql-general mailing list (pgsql
to encourage the use of databases that don't support relational
integrity?
Really?
I think that is a simply terrible idea.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
, particularly
as such an LCD is nonexistent.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
international text there are some corner cases where
lower( upper( val )) != val or upper( lower( val )) != val. Or there should
be, because that's what happens in certain languages.
For example, upper-case 'ß' should be 'SS' in German. Lower-case 'SS' is 'ss'.
--
Lew
--
Sent via pgsql-general
generate pretty much any format you
want, right?
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
as part of the
PostgreSQL source download available in the FTP area.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
in a relational database have no inherent order. You took no steps
whatsoever to guarantee the order of rows returned by the SELECT, so you
should not be surprised at any order that comes back.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
On 05/23/2010 02:15 AM, rihad wrote:
In this query:
UPDATE foo
SET allocated_to=?
WHERE id=(SELECT MIN(id) FROM foo WHERE allocated_to IS NULL)
AND allocated_to IS NULL
RETURNING id
Isn't the AND allocated_to IS NULL clause redundant?
--
Lew
--
Sent via pgsql-general mailing list (pgsql
-time data types.
But I can’t get ‘infinity’ to work for columns of type “date”.
Shoaib Mir wrote:
I don't have version 8.3 with me right now but I just gave it a try with
8.4 and it gave me the expected output:
As Tom Lane points out, that's a difference between 8.3 and 8.4.
--
Lew
--
Sent
should be
followed regardless.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
or OpenJPA (for Java applications), natural keys are sufficient and far more
straightforward than surrogate keys.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
or even the deployer's part.
So to what coding changes do you refer?
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
from the other party, that allows the other party
to impose any reasonable interpretation on the wording. IOW, ambiguity is
resolved in favor of the party who had no choice in the wording.
That would mean the licensee gets to determine what without fee means, not
the licensor.
--
Lew
looking for here.)
For a Java 'PreparedStatement' you can set a parameter to a SQL ARRAY value
only if it's of type 'java.sql.Array' but I don't know offhand how to
construct such an object other than to retrieve it from the database, a
chicken-and-egg problem. GIYF there, I suppose.
--
Lew
.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
activity,
it's impossible to know whether the cost outweighs the benefit.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
but as an indicative one. The actual license offered by the actual
copyright holder always trumps. Anyone who disbelieves the official site in
favor of Wikipedia has a fool as a researcher and a bigger one as a client.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
values differs between the
JDBC for Oracle and that for PG?
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
with unusually
large numbers of connections and/or unusually large working sets, I'm guessing
as you approach terabyte-scale dbs and up, it pays to go to even larger
shared_buffers and work_mem and do other arcane tuning magic.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
location. Here in the U.S., tomorrow
(November 1, 2009) will be 25 hours long in most, but not all, jurisdictions.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
the intended
party. Often I'll send a courtesy reply informing the sender that they have
not reached the correct party and advising them to fix their address lists.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http
different signs, so should abs('-1 day 1 hour') be
'1 day -1 hour' or '1 day 1 hour'? Or what about corner cases like
'1 day -25 hours'?
I'm writing this at about 8:35 p.m. New York time on October 31, 2009. From
now, adding interval '1 day -25 hours' yields right now, New York time.
--
Lew
day for months with 31 days and subtracts 2 days for February.
or 1 day for February, 2012.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
tuning, PG will happily deal with large volumes
of data; and 300kb a minute isn't really very much by any standards.
You can get a few numbers here: http://www.postgresql.org/about/
I know folks who've successfully worked with multi-terabyte databases with PG.
--
Lew
--
Sent via pgsql-general
email peuvent facilement
être sujets à la manipulation, nous ne pouvons accepter aucune
responsabilité pour le contenu fourni.
Confidentiality disclaimers on messages posted to a public forum are rather
pointless, especially if in languages other than the /lingua franca/ of the forum.
--
Lew
be 9.241%, and
equal or exceed 10%, as in Alabama, Arizona, California and Illinois.
http://en.wikipedia.org/wiki/Sales_taxes_in_the_United_States
It's a good idea to research the domain before deciding on the representation.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general
sheepjxx wrote:
To be precise,
The difference between
create table a (
foreign key (id) referenced by b(name),
);
create table b(
id integer referenced by b(name),
);
They're just two different forms of invalid SQL. The difference between them
makes no difference.
--
Lew
. There are some instances where the referencing table
only ever has a few rows in it, and in those cases, you likely don't
need an index.
And it is likely that the referenced table has an index since foreign keys
reference a primary key or unique-constrained (combination of) column(s).
--
Lew
--
Sent
name.
Pentaho looks good based on their website, though. I bookmarked them.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
.
Substitute 33 million for 365 for the OP's problem.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
England whose email address is
similar to mine, but has a zero where mine has an o (letter oh). In both
cases the email address is valid in and of itself, but is not valid for the
purpose intended.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes
show us Java code?
Is this a flaw in the JDBC driver or is that the expected behavior? In
either case I do now have a workaround but would like to know.
It is not a flaw in the JDBC driver.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
some cause to trust Mr. Celko's opinion on the
matter.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
, silly.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
to vet the access.
There certainly are dangers to letting the world in to your network. There
are a lot of ways to mitigate the risk. A firewall blockade in conjunction
with pg_hba.conf rules is one standard, relatively simple and fairly effective
tactic.
--
Lew
--
Sent via pgsql-general
Martin Gainty wrote:
could you provide a brief explanation of EAV ?
Please avoid HTML and eschew top-posting. The post from Jeff Soules in this
thread included the advice:
See e.g. http://en.wikipedia.org/wiki/Entity-Attribute-Value_model
which points to an explanation.
--
Lew
--
Sent
Print action on one of their workstations. (Binding extra.)
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
for memory units is
1024, not 1000.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
the application domain, not lucky
guesses about a limited sample of inputs.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
BY md5cnt DESC;
Use HAVING instead of WHERE.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
, and when you think about it, indeed
such a clause doesn't make sense.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
newsreader.
Who wrote the message you quoted (you failed to cite the source)?
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
with a little extra just in case the future brings more.
It's a question of what represents the data most accurately and completely.
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
as GMT+12, plus one more for Daylight Saving
Time.
Likewise,
http://en.wikipedia.org/wiki/Wellington
lists Wellington's time zone as
Time zone NZST (UTC+12)
- Summer (DST) NZDT (UTC+13)
--
Lew
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
Oracle 8, or Java 1.3, for example, to see how
conservative many shops are with respect to upgrades.
I'm not saying they should be that conservative, but many organizations are
and we must be ready to deal with that.
--
Lew
---(end of broadcast
, and
that these organizations should upgrade.
--
Lew
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
it is.
Chances are good that the auto-genned sequence will work for you, if you think
about it. If not, would you share why you anticipate that gaps will cause
trouble for you?
--
Lew
---(end of broadcast)---
TIP 4: Have you searched our list archives
structure wound up with a non-EAV description.
--
Lew
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
Lew wrote:
Tom Lane wrote:
Before you get into that, try reducing these parameters:
maintenance_work_mem = 1572864
work_mem = 1048576
They are way too high, especially the second one.
So if 1.5 MB maintenance_work_mem and 1 MB work_mem are way too high,
why are the default values
in the postgresql.conf on installation 16 MB and 1 MB,
respectively?
--
Lew
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
want to know the times when I haven't gotten the complete order yet.
If we get more then we ordered, I don't want it to be in this query.
Huh?
How does that relate to the suggestion?
The suggested expression is mathematically equivalent to and perfectly
substitutable for the original.
--
Lew
WHERE COALESCE( folder_id, 0 ) = 0;
--
Lew
---(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
, and the
question isn't really related to the content of the email.
Strictly speaking, then, that isn't top-posting but inline posting, where in
line is position 0, with trim, where the amount trimmed is none.
--
Lew
---(end of broadcast)---
TIP 1
in such convention-picking (because
by choosing English, we surely discriminate against the unilingual Latin
speakers).
De mortuis nil nisi bonum dicendum est.
--
Lew
---(end of broadcast)---
TIP 6: explain analyze is your friend
as a scolding and take offense.
--
Lew
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
).
From http://en.wiktionary.org/wiki/forum
--
Lew
You want picky? I got picky!
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
? IANAL, but as I understand it from /The Hacker Crackdown/ by
Bruce Sterling, it figured into the defense of a BBS operator accused of
disseminating confidential ATT information in the U.S. ca. 1990.
--
Lew
---(end of broadcast)---
TIP 2: Don't
to read it on the list;
why in the world would I want that clutter in my inbox?
That's why my email address here is a separate one just for Usenet; I can
pretty much ignore replies that come directly to it.
--
Lew
---(end of broadcast)---
TIP 6
was the problem with my post?
--
Lew
---(end of broadcast)---
TIP 6: explain analyze is your friend
%ROWTYPE;
begin
rec.s_val = 100;
rec.e_val = 101;
retval = (rec.s_val - rec.e_val) / rec.s_val;
return retval;
end
Also, one wonders why you need to do the calculation via a row or record at
all, when it would seem so easy just to plug in the values.
--
Lew
Lew wrote:
Postgres User wrote:
The problem turned out to be related to my function..
Given this table:
CREATE TABLE table2 (
s_val numeric(6,2),
e_val numeric(6,2)
) WITH OIDS;
The following functions of code will set retval = NULL;
declare
retval numeric(6,2);
rec record;
begin
Lew wrote:
Try eliminating the double quotes in the CSV file. Wannabe NULL
would then be ,, (consecutive commas)
in the CSV. From the docs, you don't even need the NULL AS
clause in your COPY statement.
Ivan Sergio Borgonovo wrote:
Exactly what I did because fortunately there weren't too
/tutorial/jdbc/index.html
SunIYF, PGIYF (in this case, jdbc.postgresql.org IYF) and GIYF.
--
Lew
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
eliminating the double quotes in the CSV file. Wannabe NULL would then be
,, (consecutive commas)
in the CSV. From the docs, you don't even need the NULL AS clause in your
COPY statement.
--
Lew
---(end of broadcast)---
TIP 9: In versions
, and accept it.
--
Lew
---(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
, then OFFSET rows are skipped
*before starting to count the LIMIT rows that are returned.*
(emphasis added)
That's SQL, my friend. OFFSET first, then LIMIT. Irrespective of the order
in the query statement. It is what it is. SQL doesn't depend on LINQ for its
semantics.
--
Lew
operator, so the term commutative
has to be understood metaphorically at best. What exactly do you mean by
commutative?
--
Lew
This post contained three requests for answers.
---(end of broadcast)---
TIP 6: explain analyze is your friend
was made an external
project instead of bundled with the server source code. The JDBC driver
is available from http://jdbc.postgresql.org/download.html
Cross-posted to correct the OP's multi-post, so that pgsql.admin will also
contain the response(s).
--
Lew
---(end
be looking for the JDBC driver. If
so, see http://jdbc.postgresql.org/.
Yes, this answer has been provided to the OP already.
--
Lew
---(end of broadcast)---
TIP 6: explain analyze is your friend
representation) of it is a mistake. Hashes are not strings and shouldn't be
treated as such.
--
Lew
---(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
)
expression::type
Incidentally, float is about the worst data type to represent monetary amounts
that one can choose.
--
Lew
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
for dependent columns.
What you want to do is literally remove the old record and insert a new one.
The duplicate key violation is the purpose of having a primary key, after all.
Otherwise you'd create two rows where you should only have one.
--
Lew
---(end of broadcast
deviation of your k
runs. Compare with and without anti-virus running.
How much control do you have over the test machine's operating profile, i.e.,
what services and background tasks are running, network I/O, other factors
that can influence timing?
--
Lew
---(end
,
but almost as fast as Oracle (since the hardware platforms
are different, it's hard to compare directly).
This is something we've been saying for the last 2 years, and now we can prove it.
There are links to the SPEC site which shows the tuning parameters.
--
Lew
experience,
but somewhat more limited PG-specific knowledge, or, I've been honing my PG
DBA skills, and I have a solid but basic competence, and the like.
Chances are you will be able to make such judgments with much more confidence
than claiming to be or not to be a DBA.
--
Lew
to handle these tasks, and if the workload is high enough, that needs to
be someone's primary duty.
Unless, of course, you simply don't care about your data. The lifeblood of
your enterprise.
--
Lew
---(end of broadcast)---
TIP 2: Don't 'kill -9
invalid input without regard for their intent.
Calling rejection of invalid input puritanical is not an engineering
evaluation.
--
Lew
---(end of broadcast)---
TIP 6: explain analyze is your friend
responsibility that the byte sequences you create are valid characters in the
server character set encoding.)
http://www.postgresql.org/docs/8.2/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS
Amazing how useful the docs are.
--
Lew
---(end of broadcast
, but sometimes it's better to create
separate indexes and rely on the index-combination feature.
The selectivity of each column is also relevant. If you have ten million rows
with s_id values of only either 0 or 1, an index on s_id is not
going to help much.
--
Lew
.
As Richard metioned, there are plenty of boundary cases that require a
judgment call. Try to analyze which approach will have more risk in such
cases; sometimes that helps discriminate. It ain't always easy; that's why
they pay us the big bucks.
--
Lew
---(end of broadcast
as flexible as possible (I have several tables
to audit).
Somebody has any suggestion?
You got some suggestions in response to your multipost of this question in
pgsql.sql.
--
Lew
---(end of broadcast)---
TIP 1: if posting/reading through Usenet
NULL, doesn't that mean that the
imported data still differ from the exported?
--
Lew
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
set to Company but
that seems like a waste. I tried the above and I got a syntax error.
Can there be more than one row in item_bases with the same item_id but
different item_types?
--
Lew
---(end of broadcast)---
TIP 4: Have you searched our list
will appear, in start_date
ascending order.
Is CURRENT_DATE evaluated once for the query or twice for each row?
--
Lew
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
.
--
Lew
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Relativity of information.
--
Lew
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
database in the cluster. Sharing of user names means that there cannot be different users named, say, joe in two databases in the same cluster; but the system can be configured to allow joe access to only some of the databases.
In the OP's case, some of the databases is one of the databases.
--
Lew
Francisco Reyes wrote:
Lew writes:
Strange? Why? Did you expect a particular statistical distribution?
Perhaps
The impression was that one query was returning everything.. and the
other only the records that did not exist in the one table.
you were surprised by the extent
prefer Postgre, I really
do.)
--
Lew
---(end of broadcast)---
TIP 6: explain analyze is your friend
aligning indexes on one-byte data.
The OP didn't say one-byte data, they said one-char data.
--
Lew
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
, nation_id )
);
The circular foreign-key relationships might be problematic - would someone
comment on that?
To handle that I would ensure that any transaction that updates
nations (king) checks that the pretender's man_id is already correctly
entered in nations.
--
Lew
to each group separately) is frustrating because it
fragments the conversation.
--
Lew
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
two indexes, one on
each column?
I am guessing that changes to the table are slower with two indexes. How
could it affect queries?
What if the typical query pattern was more balanced among constraints on one
column, on the other, and on both?
--
Lew
---(end
.
One assumes you mean implicit foreign key relations, since MyISAM doesn't
enforce them (hence the reason they're broken, potentiated by the lack of
transaction support).
Sadly, there is a market for wrong answers faster.
--
Lew
---(end of broadcast
export_messages WHERE export_id NOT IN
( SELECT export_id FROM exports );
--
Lew
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
.
Just use the syntax that best expresses your structure: PRIMARY KEY and
FOREIGN KEY.
--
Lew
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
I've encountered so far to this type of problem is to have a
table of days with columns like isWeekday, isHoliday, julianDay,
otherTidbit, ...
Then you select or join the days within the interval of interest and factor
out weekdays, or holidays, or whatever.
--
Lew
1 - 100 of 106 matches
Mail list logo