Re: [SQL] Data type confusion

2001-08-05 Thread Tom Lane
e plenty of such gaps in our operator set... > Shouldn't > INTERVAL / INTERVAL = INTEGER? I'd think the output should be FLOAT8, myself, since the result could be fractional. Anyway, the generic response to such questions is "feel free to code it up and submit a p

Re: [SQL] Re: Data type confusion

2001-08-05 Thread Tom Lane
lus 4.5 days, and then we translate the .5 months into 15 days. This is pretty grotty, and AFAIK not documented anywhere --- I found it out by looking at the C code for these operators. But I'm not sure how to do better. regards, tom lane

Re: [SQL] Re: Data type confusion

2001-08-05 Thread Tom Lane
n tests, "1 day" and "24 hours" are not the same thing. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Re: Data type confusion

2001-08-05 Thread Tom Lane
95 measured with respect to the length of February, or of March? Does it matter that 2000 is a leap year? There may be some other operations that have sensible interpretations for such a datatype, however. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Re: Data type confusion

2001-08-06 Thread Tom Lane
users just want to do simple > things. Like we want to know how many weeks an employee has been with > us for: '2 years 3 months'::INTERVAL / '1 week'::INTERVAL (and we > don't care about the fractional week left over). Good point. Ugly as the "30 day&

Re: [SQL] prob with PERL/Postgres

2001-08-06 Thread Tom Lane
ation recommend $conn = Pg::connectdb(whatever); die $conn->errorMessage unless PGRES_CONNECTION_OK eq $conn->status; Try that, and if you're still in the dark, let us see the error message... regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Re: Data type confusion

2001-08-06 Thread Tom Lane
ally comparable only with other day- time intervals. [...] Operations involving items of type datetime require that the date- time items be mutually comparable. Operations involving items of type interval require that the interval items be mutually compara- ble.

Re: [SQL] Re: Data type confusion

2001-08-06 Thread Tom Lane
"Josh Berkus" <[EMAIL PROTECTED]> writes: > Hmmm ... does this mean that I couldn't divide '1 year' by '1 week'? That's exactly what it says. regards, tom lane ---(end of broadcast)

Re: [SQL] Are circular REFERENCES possible ?

2001-08-07 Thread Tom Lane
mp dump them correctly? regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Why can't I .........

2001-08-07 Thread Tom Lane
optional. However, Postgres contains a lot of extensions to SQL92, and some of them produce parse ambiguities if AS is optional. So we require it. This isn't going to change, as it would require ripping out a lot of useful stuff. regards, tom lane --

Re: [SQL] loop on a rule

2001-08-07 Thread Tom Lane
era (accion,tabla) VALUES ('D','carrera'); > ); I think you need the patch for multi-action rules --- see http://www.ca.postgresql.org/cgi/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteHandler.c You need version 1.93.2.1, assuming that you're on PG 7.1.2.

Re: [SQL] Problem with aggregate functions and GROUP BY

2001-08-08 Thread Tom Lane
ple in the SELECT reference page. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get

Re: [SQL] what does this error mean?

2001-08-09 Thread Tom Lane
Carolyn Lu Wong <[EMAIL PROTECTED]> writes: > When trying to delete data from a table, get the following error: > ExecutePlan: (junk) `ctid' is NULL!=ODBC.QueryDef May we see the query and table schema? regards, tom lane ---

Re: [SQL] Eh?

2001-08-13 Thread Tom Lane
"Josh Berkus" <[EMAIL PROTECTED]> writes: > SHould I be concerned about this? > DEBUG: geqo_main: using edge recombination crossover [ERX] Nope. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/geqo.html

Re: [SQL] create function using language SQL

2001-08-14 Thread Tom Lane
Gary Stainburn <[EMAIL PROTECTED]> writes: > ... However, I cannot find the > syntax to create a function in SQL. Specifically, how you return the result. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/xfunc.html#XFUNC-SQL regar

Re: [SQL] Re: DateDiff, IsNull?

2001-08-14 Thread Tom Lane
ator + (procedure = textcat, regression(# leftarg = text, rightarg = text); CREATE regression=# select 'aa'::text + 'bb'::text; ?column? -- aabb (1 row) Whether this is a good idea is another question --- but if Bill's intent on not using the SQL-standard text co

Re: [SQL] Eh?

2001-08-14 Thread Tom Lane
be formed on the basis of the actual query; there's no way to pull out the part for a view. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] Deadlocks? What happened to MVCC?

2001-08-14 Thread Tom Lane
MVCC does not mean "no locks" ... particularly not when UPDATEs are involved. You'll need to be more specific about what your function is doing, but my first thought would be to look for the possibility of conflicting updates of the same row. re

Re: [SQL] psql connection being reset during function?

2001-08-14 Thread Tom Lane
oss rows. This will probably be much faster than your other approach anyway, since it doesn't require re-finding each row with a fresh UPDATE. A function call is a whole lot cheaper than parsing, planning, and executing a new query. regards, tom lane ---

Re: [SQL] Nested JOINs

2001-08-16 Thread Tom Lane
Oleg Lebedev <[EMAIL PROTECTED]> writes: > What am I doing wrong? Using 7.0, perhaps? The query parses fine for me in 7.1. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archiv

Re: [SQL] Nested JOINs

2001-08-16 Thread Tom Lane
imply that a correlation name would NOT be accepted. It took a fair amount of work to derive a grammar that was unambiguous and still accepted everything... regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Temp tables being written to disk. Avoidable?

2001-08-20 Thread Tom Lane
table, as opposed to writing a sub-SELECT-in-the-FROM-clause? ISTM that that feature takes care of most of the simple notational reasons for wanting a temp table. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and un

Re: [SQL] database location question

2001-08-21 Thread Tom Lane
x27;cp -p -r' or 'tar' or some such), put a symlink to the new place at /var/lib/pgsql/data, and away you go. Or forget the symlink and instead tell the postmaster where the data tree is with a -D switch. regards, tom lane ---(end of bro

Re: [SQL] Getting 'n-1'th record.

2001-08-21 Thread Tom Lane
simplify your life by reversing the ordering and choosing the second row (OFFSET 1 LIMIT 1). regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] exists

2001-08-21 Thread Tom Lane
bright enough to choose fast-startup plans over least-total-cost plans in cases where fast-startup is what you want. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.pos

Re: [SQL] Should I worry?

2001-08-21 Thread Tom Lane
se that stuff works fine AFAIK. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] exists

2001-08-21 Thread Tom Lane
g, but a deliberate simplification to save planning time. The planner cannot alter the number of times the SELECT output expressions are evaluated (at least not if it's delivering the right answer) so there's no point in worrying whether they are expensive or cheap. But it would include

Re: [SQL] exists

2001-08-21 Thread Tom Lane
-> Seq Scan on tenk1 (cost=0.00..333.00 rows=1 width=148) EXPLAIN which seems at least moderately self-explanatory. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.po

Re: [SQL] Function returning an array

2001-08-23 Thread Tom Lane
ay value in SQL or plpgsql languages. I know that you can do it in pltcl (there are examples in the pltcl self-test), and of course you can do it in C. A brute-force solution is to make a support function in one of those languages that takes two varchars and returns an array of varcha

Re: [SQL] undocumented setval()

2001-08-26 Thread Tom Lane
ge section, but a section nonetheless. Any volunteers to write it? regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Different Choices For Index/Sequential Scan With And Without A Join In 7.2

2001-08-26 Thread Tom Lane
n choices. See ALTER TABLE SET STATISTICS. I'd be interested to hear about it if so --- the current default target of 10 was picked "out of the air" and might well be off-base. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] "AND", "OR" and Materialize :((((

2001-08-26 Thread Tom Lane
is the right thing. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://www.postgresql.org/search.mpl

Re: [SQL] WHERE on an alias

2001-08-27 Thread Tom Lane
thus, you can't have references to tables that aren't part of that sub-SELECT. This is a lot different from subselects in WHERE, the select target list, etc, since they can depend on their context. If you can think of a clearer way of phrasing the docs, let's have

Re: [SQL] WHERE on an alias

2001-08-27 Thread Tom Lane
he weather-report example on the SELECT reference page for inspiration). But I'm still pretty fuzzy on what the table layout is and why this computation makes any sense. Maybe the real answer is to back up a few steps and reconsider your table design.

Re: [SQL] Performance on large functions

2001-08-27 Thread Tom Lane
he optimizer picking bad plans because it can't see the exact values being used in queries. Can you show us the details of the function? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Performance on large functions

2001-08-27 Thread Tom Lane
umber of updates that you do? Twelve passes of updates seems like a lot. Maybe you could restructure things to allow the data to be assembled in fewer steps. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off a

Re: [SQL] WHERE on an alias

2001-08-27 Thread Tom Lane
ost=109.96..109.96 rows=25 width=20) -> Merge Join (cost=0.00..109.38 rows=25 width=20) -> Index Scan using ut_pkey on ut (cost=0.00..52.00 rows=1000 width=8) -> Index Scan using ml_f1f2 on ml (cost=0.00..52.00 rows=1000 width=12) which doesn't look to

Re: [SQL] WHERE on an alias

2001-08-27 Thread Tom Lane
ne ml value at all? The DISTINCT ensures you get only one row per f1/f2 combination, and the use of ORDER BY together with DISTINCT ON forces it to be the row with the maximal ml value. See the SELECT reference page. regards, tom lane ---

Re: [SQL] On Differing Optimizer Choices ( Again)

2001-09-03 Thread Tom Lane
idea. It would slow down all queries (probably by quite a bit) for a benefit that I suspect arises relatively seldom. Might be worth looking at this sometime in the future, but... regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Index Scan Backward vs. Sort/Sequential Scan when using ORDER BY

2001-09-03 Thread Tom Lane
27;F' OR p.profiles_orientation[1]='M'); I suspect the main problem may be lack of stats about the array element distributions. Does profiles_orientation really need to be an array, or could you break it out into separate fields?

Re: [SQL] duplicated oid

2001-09-06 Thread Tom Lane
n't > know which ID to use? any suggestions? Use ctid to distinguish the rows. Note ctid will change if you update a row, so it's not a permanent identifier either, but it will serve for deleting a row. regards, tom lane ---(end of broadc

Re: [SQL] ERROR: DefineQueryRewrite: rule plan string too big.

2001-09-07 Thread Tom Lane
Indeed. > Is this fixed in the upgrade versions? Yes. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] optimizing queries and indexes...

2001-09-15 Thread Tom Lane
stgres absolutely does not care: the optimizer will always consider both A-join-B and B-join-A orders for every join it has to do. As Stephan and Josh noted, you can constrain the join pairs the optimizer will consider if you use explicit-JOIN syntax --- but each pair will be considered in both dir

Re: [SQL] SQL request change when upgrade from 7.0.2 to 7.1.3

2001-09-16 Thread Tom Lane
rd output columns of the UNION. Pre-7.1 got this wrong (and would sometimes produce wrong output ordering or even a backend crash, if the arms of the UNION didn't all yield the same datatype). regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Intentional, or bug?

2001-09-16 Thread Tom Lane
. See the list archives for more detail than you really wanted. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] Part 2 of "Intentional, or a bug"....

2001-09-16 Thread Tom Lane
strongly... regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Out of free buffers... HELP!

2001-09-19 Thread Tom Lane
the postmaster with? Try setting it to 1500 or more, if it's not already. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Out of free buffers... HELP!

2001-09-18 Thread Tom Lane
d. Jeffrey must be running into some kind of buffer-leak bug ... but it's hard to think what, unless he's running an extremely old PG version. We haven't seen reports of buffer leaks in a long time. So I'd like to run that down, quite independently of whether he sh

Re: [SQL] PL/PGSQL Regexe

2001-09-19 Thread Tom Lane
t (1 row) regression=# select ':' ~ '[A-Za-z0-9_]'; ?column? -- f (1 row) How old is your Postgres? (I can tell by the spelling of the error message that it's not current.) regards, tom lane ---(end of br

Re: [SQL] Selecting latest value

2001-09-20 Thread Tom Lane
's not hard: SELECT DISTINCT ON (userid) userid, val, ts FROM table ORDER BY userid, ts DESC; See the DISTINCT ON example in the SELECT reference page for more info: http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/sql-select.html regards, tom lane

Re: [SQL] Table Constraints with NULL values

2001-10-19 Thread Tom Lane
this statement is wrong, and that we do follow the spec. There have been a number of arguments about this in the past though... evidently whoever touched this doc page last had the opposite opinion. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] index question

2001-10-18 Thread Tom Lane
count(distinct ...) isn't bright enough to make use of indexes. Now an index on (a,b) can substitute for an index on a, so if you have other queries that could use both columns of the (a,b) index then it might be worth making that instead of an index on a.

Re: [SQL] Table Constraints with NULL values

2001-10-19 Thread Tom Lane
s question several times before, with no permanent resolution --- the plain fact is that the spec isn't very clearly written. Useful data would be tests demonstrating how other systems (Oracle, DB2, etc) interpret the issue. regards, tom lane ---(e

Re: [SQL] Index of a table is not used (in any case)

2001-10-23 Thread Tom Lane
that will be faster than an indexscan. It's not necessarily wrong. Have you compared the explain output and actual timings both ways? (Use "set enable_seqscan to off" to force it to pick an indexscan for testing purposes.) regards, tom lane -

Re: [SQL] CREATE RULE ON UPDATE/DELETE

2001-10-22 Thread Tom Lane
AS ON UPDATE TO dbl DO INSTEAD UPDATE raw SET id = NEW.id / 2, name = NEW.name WHERE OLD.id = id * 2; (untested...) regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Cross-posting (was Re: [SQL] GUID in postgres)

2001-10-24 Thread Tom Lane
u get only one copy of cross-posted messages. It's a real godsend IMHO. Set your subscription class to "unique" rather than "each" for all lists you are on, and presto. regards, tom lane ---(end of broadcast)

Re: [SQL] Doing a regexp-based search/replace?

2001-10-18 Thread Tom Lane
uitable. Write a function in pltcl or plperl, either of which can mash text strings with ease and abandon ... regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] View consistency

2001-11-01 Thread Tom Lane
regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] When will vacuum go away?

2001-10-18 Thread Tom Lane
o produce a 7.2 beta :-(. Producing another 7.1 patch release isn't in the cards. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Strange Problem As Type Casting

2001-11-03 Thread Tom Lane
ery using an explicit cast Got any triggers, rules, or foreign keys for this table? The error is not necessarily in the command you typed, it could be in subsidiary processing. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Aggregate binary AND

2001-11-01 Thread Tom Lane
m of AND (the keyword-AND operator isn't a function). I'll leave that part as an exercise for the student ... regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] A bug in triggers PG 7.1.3 or misunderstand ?

2001-09-27 Thread Tom Lane
I think you need "return old", not "return new", in the body of the trigger if you want the delete to take place. new would be NULL in a delete situation ... regards, tom lane ---(end of broadcast)---

Re: [SQL] HP-UX 11.0 postgres compile error!

2001-09-27 Thread Tom Lane
Why are you using PG 7.0.2? 7.1.3 is the current release. regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [HACKERS] [SQL] outer joins strangeness

2001-09-24 Thread Tom Lane
Alex Pilosov <[EMAIL PROTECTED]> writes: > I'm going to CC this to -hackers, maybe someone will shed a light on the > internals of this. It's not unintentional. See http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/explicit-joins.html

Re: [SQL] Out of free buffers... HELP!

2001-09-18 Thread Tom Lane
the schema you are actually working with --- how many tables are implied by "brick*", for example? regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Out of free buffers... HELP!

2001-09-20 Thread Tom Lane
could measure the difference --- what results are you getting? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Creating a boolean function

2001-09-19 Thread Tom Lane
=?iso-8859-1?Q?Miguel_Gonz=E1lez?= <[EMAIL PROTECTED]> writes: > But I got that the parser cannot identify the =$ operator You need a space between = and $. regards, tom lane ---(end of broadcast)--- TIP 2: you ca

Re: [SQL] [NOVICE] Loading current_user and current_timestamp using COPY

2001-10-10 Thread Tom Lane
ld be using INSERT not COPY. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Beginner's List

2001-10-04 Thread Tom Lane
or pgsql-novice is pretty tiny. I see 12 postings so far this month. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] indexing and LIKE

2001-10-12 Thread Tom Lane
rows=10 width=12) EXPLAIN The difference is probably a locale problem: if you aren't in C locale then the index LIKE optimization is disabled because it doesn't work reliably. See the list archives for more info. regards, tom lane ---

Re: [SQL] Why would this slow the query down so much?

2001-10-15 Thread Tom Lane
h caturljoin row? How many urllist rows ditto? regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] Ordering by field using lower()

2001-10-13 Thread Tom Lane
lower() to be applied to an int2 field. If your app expects to be able to apply lower() to any datatype at all, I'd say your app is broken. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Us

Re: [SQL] temporary views

2001-10-07 Thread Tom Lane
behavior be? Can a long-lived function validly refer to short-lived tables? If so, what should the semantics be, exactly? regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregiste

Re: [SQL] When will vacuum go away?

2001-10-16 Thread Tom Lane
ere not up to date --- if the doc/TODO file doesn't contain a date in October, it's stale). I think the only thing we're still waiting on is some datetime fixes from Tom Lockhart... regards, tom lane ---(end of broadcast)---

Re: [SQL] PARSER ERROR persists ....

2001-09-27 Thread Tom Lane
older (try "select version()" to prove it). regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Aggregate Aggravation

2001-09-27 Thread Tom Lane
"Robin's PG-SQL List" <[EMAIL PROTECTED]> writes: > I have a query using the SUM() function that is not returning the > appropriate results. I'm guessing that you have two rows in bolcustomer matching bol_number = 88738, so that the 14 gets added in twice.

Re: [SQL] CHECK problem really OK now...

2001-09-26 Thread Tom Lane
also affect updates of child tables, but tracing through your example with 7.1 shows clearly that the CHECK is being applied to a slot that contains a four-column tuple and only a three-column descriptor. Ooops. regards, tom lane

Re: [SQL] to_date/to timestamp going to BC

2001-10-03 Thread Tom Lane
to_timestamp + March 11, 1997 | 1997-03-11 00:00:00-05 (1 row) However, I'd agree that this shows a lack of robustness in to_timestamp; it's not objecting to data that doesn't match the format. regards, tom lane ---

Re: [SQL] SQL-Programmer tool and field%type support

2001-10-08 Thread Tom Lane
gSQL, > but not in Postgres SQL. It does work in 7.2devel, however ... regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] ROUND function ??

2001-10-08 Thread Tom Lane
?? Because the IEEE float math standard says so. Round-to-nearest-even is considered good practice. > How do I get to approximate any number x.5 as x+1 ?? Try FLOOR(x + 0.5) if you really want the other behavior. regards, tom lane ---(end of

Re: [SQL] aggregate functions, COUNT

2001-10-02 Thread Tom Lane
the planner assumes that automatically. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly

Re: [SQL] strange query execution times

2001-10-02 Thread Tom Lane
any rows. FWIW, 7.2 has better statistics and should be better able to pick the right plan in this context ... regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send &

Re: [SQL] 7.0.3 and 7.1.3 different results?

2001-10-02 Thread Tom Lane
returned zero. I just double checked, and I get a NULL there too. If we ever returned zero, it was a long time ago. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropr

Re: [SQL] faster and faster!!

2001-10-02 Thread Tom Lane
hable" and "not cachable", along the lines of "result is constant within a query", so that the behavior of now() can be described more accurately. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] ORDER BY case insensitive?

2001-10-04 Thread Tom Lane
clause with the available indexes, and then sees whether the clauses they are mentioned in are comparisons that the index can help with. In this case the "thing" mentioned is "function(column)" rather than just "column", but otherwise it's just lik

Re: [SQL] MEDIAN as custom aggregate?

2001-10-13 Thread Tom Lane
like, constants or $n parameters only. I do not know of any median-finding algorithm that doesn't require a depressingly large amount of storage... regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading thro

Re: [SQL] problem w/plpgsql proc

2001-10-15 Thread Tom Lane
leo <[EMAIL PROTECTED]> writes: > CREATE FUNCTION editEmail(integer, smallint, varchar, varchar) RETURNS > integer AS ' > ... > -- if it wasn't, then insert the new record. An undoubled quote mark in a function body is bad news...

Re: [SQL] Restricting access to Large objects

2001-10-15 Thread Tom Lane
"Aasmund Midttun Godal" <[EMAIL PROTECTED]> writes: > How can I restrict access to large objects. You can't. This is one of the many deficiencies of large objects. regards, tom lane ---(end of broadcast)-

Re: [SQL] Triggers do not fire

2001-10-16 Thread Tom Lane
zero rows were updated, so of course there was nothing to fire the trigger on. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Restricting access to Large objects

2001-10-16 Thread Tom Lane
Christopher Sawtell <[EMAIL PROTECTED]> writes: > On Tue, 16 Oct 2001 03:46, Tom Lane wrote: >> You can't. This is one of the many deficiencies of large objects. > But now that the limit on row length / size has gone away, and that the new > BYTEA type has appeared, i

Re: [SQL] Performance problems - Indexes and VACUUM

2001-10-17 Thread Tom Lane
a VACUUM, the query bogs down. What has been changing in the meantime? regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Triggers do not fire

2001-10-17 Thread Tom Lane
omplicated for yourself. One big table with a suitable index ought to work fine. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Performance problems - Indexes and VACUUM

2001-10-17 Thread Tom Lane
emselves only as database errors. Evidently Postgres was pushing the disk harder than anything else on the system, so it was more likely to get bit by a sporadic hardware booboo. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] using SQL to evaluate arbitrary expressions?

2001-10-01 Thread Tom Lane
useless table reference. But you can take comfort in the fact that there's a simple workaround if you're ever forced to use a DBMS that won't accept this syntax. regards, tom lane ---(end of broadcast)--

Re: [SQL] Rule problem

2002-06-13 Thread Tom Lane
rs will probably work better than rules. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [SQL] Another postgres 'file not found' error

2002-06-13 Thread Tom Lane
recall many (if any) prior reports of such failures, so I'm leaning towards a hardware glitch having caused it. I'd recommend running some memory and disk diagnostics ... regards, tom lane ---(end of broadcast)--- T

Re: [SQL] serial column vs. explicit sequence question

2002-06-13 Thread Tom Lane
es ($masterid, ...); insert into detail ... $masterid ...; rather than letting the default expression do it for you. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [SQL] simple recursive function in plpgsql fails

2002-06-13 Thread Tom Lane
g a clean distinction between plan tree and execution state. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Request for builtin function: Double_quote

2002-06-18 Thread Tom Lane
o a > builtin C function. What does this do that isn't already done by quote_literal? regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Optimizer question with equivalent joins

2002-06-21 Thread Tom Lane
Dirk Lutzebaeck <[EMAIL PROTECTED]> writes: > say I have a join which says > t.a = t.b and t.b = t.c > do I need to give the optimizer a hint by saying it more redundantly > t.a = t.b and t.b = t.c and t.c = t.a Not since about 7.0.3 ...

<    1   2   3   4   5   6   7   8   9   10   >