Re: [SQL] Syntax error while altering col-type

2005-01-13 Thread Andrew Sullivan
On Thu, Jan 13, 2005 at 01:30:21PM +0100, KÖPFERL Robert wrote: > but that's the reason, the USING clause exists. It however still remains a Right. Please see the archives about how this was hammered out. A -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for

Re: [SQL] Column with recycled sequence value

2005-01-13 Thread Andrew Sullivan
NO CYCLE. One potential problem, of course, are collisions on the table, because some value wasn't cleared out. It sounds like you don't have that problem though. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote is not data. --Roger Brinner

Re: [SQL] Column with recycled sequence value

2005-01-13 Thread Andrew Sullivan
On Thu, Jan 13, 2005 at 03:31:54PM -0600, Scott Marlowe wrote: > Any method that tries to reuse sequence numbers is a bad idea (TM) and Why? I can think of a dozen cases where it can be useful. It just depends on the application. A -- Andrew Sullivan | [EMAIL PROTECTED] In the future t

Re: [SQL] Column with recycled sequence value

2005-01-13 Thread Andrew Sullivan
and retraining 100 people. Is it a pretty design? Probably not. Is it something that is, of all the compromises available, the best one under the circumstances? I dunno; I'd have to look at the circumstances. I think it's probably usually a good idea to avoid this, sure, but I'm n

Re: [SQL] SQL design question: null vs. boolean values

2005-01-15 Thread Andrew Sullivan
(field_foo in 'y', > 'n') I'd use "boolean not null default 'f'", myself. But in any case, this is _not_ a use for NULL, because you know absolutely what the deal was: either the user selected, or else it didn't. A -- Andrew Sullivan | [EMAIL PR

Re: [SQL] same question little different test MSSQL vrs Postgres

2005-01-26 Thread Andrew Hammond
gres log files (or syslog) on a seperate filesystem. - -- Andrew Hammond416-673-4138[EMAIL PROTECTED] Database Administrator, Afilias Canada Corp. CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A Joel Fradkin wrote: | The postgres is running on Linux Fedora core 3 (production will be redhat o

Re: [SQL] Timestamp with timezone question.

2005-02-21 Thread Andrew - Supernews
-++---+- 1 | 2005-03-21 15:05:00+00 | -08:00:00 | 2005-03-21 07:05:00 (1 row) -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)---

Re: [SQL] PostgreSQL ignores my indexes

2005-02-23 Thread Andrew Sullivan
. But that's what you're doing, and using the index would be more expoensive than this. A -- Andrew Sullivan | [EMAIL PROTECTED] Information security isn't a technological problem. It's an economics problem. --Bruce Schneier --

Re: [SQL] table constraints

2005-02-28 Thread Andrew - Supernews
r that you are checking the data only at the time of modification, whereas CHECK constraints are declarative constraints which are expected to be true at all times. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)

Re: [SQL] AutoCommit and DDL

2005-02-28 Thread Andrew - Supernews
ften AccessExclusive, which blocks queries). > As a test I moved the partition function call to the beginning of the > script (before the objects were created) and it worked just fine. I > then changed the object declarations passing in the single DB handle, > and every now works just

Re: [SQL] Postgres performance

2005-03-02 Thread Andrew Sullivan
t file writing. A -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting out of debt, yet are against all taxes for raising money to pay it off. --Alexander Hamilton ---(end of broadcast)--- TIP 3:

Re: [SQL] definative way to place secs from epoc into timestamp

2005-03-03 Thread Andrew - Supernews
s correspond to timestamp _with_ time zone. (Why are you using timestamp without time zone anyway? For recording the time at which an event occurred that usage is simply wrong - in fact I can't see any situation in which a Unix epoch time can correctly be converted to a timestamp without tim

Re: [SQL] definative way to place secs from epoc into timestamp

2005-03-03 Thread Andrew - Supernews
2005-03-03 22:15:54-08 | 1109916954 (1 row) Notice that the stored timestamp doesn't actually change; it is displayed differently according to the timezone. The Unix time correctly _doesn't_ change, reflecting the fact that what we stored was the absolute time. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[SQL] date - date returns integer?

2005-03-04 Thread Andrew Hammond
*/ SELECT ('2005-03-04'::date - '2005-01-01'::date)::interval; ERROR: cannot cast type integer to interval - -- Andrew Hammond416-673-4138[EMAIL PROTECTED] Database Administrator, Afilias Canada Corp. CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A -BEGIN PGP S

Re: [SQL] definative way to place secs from epoc into timestamp

2005-03-04 Thread Andrew - Supernews
On 2005-03-04, "Joel Fradkin" <[EMAIL PROTECTED]> wrote: > Just so I don't make a newb mistake I should use timestamptz not timestamp > where the exact moment is important? Yes. -- Andrew, Supernews http://www.supernews.com - individual

Re: [SQL] Building a database from a flat file

2005-03-06 Thread Andrew - Supernews
ur application work on a set of views. Then you can change the > views via "create or replace view" for switch over. Same problem applies here. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)

Re: [SQL] Parameterized views proposition

2005-03-12 Thread Andrew - Supernews
an't be converted into additional WHERE clauses. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Consecutive row count query

2005-03-17 Thread Andrew Hammond
You could hack it using a custom aggregate. NB: you'll want to reset the categorizer_seq every now and then. And this isn't safe for concurrent queries. You could make it safe for concurrent queries by using a complex type for STYPE, but I didn't bother. I also haven't debugged this, but I thi

Re: [SQL] Question on triggers and plpgsql

2005-04-08 Thread Andrew Sullivan
gger puts the mail content into a table of mails to be sent, and wakes up the mail-sender client with the NOTIFY; the NOTIFY and the commit to the mail-it table only happen in that case if the transaction commits. And since mail is async anyway, the extra few seconds shouldn't make any diff

Re: [SQL] getting count for a specific querry

2005-04-08 Thread Andrew Sullivan
> get a case insensitive search? I could use ~* or perhaps do an > UPPER(firstname) in the select etc? The upper() (or lower() -- whatever) stragegy is what I'd use. In any case, you want to make sure you put functional indexes on all such columns, because otherwise you'll never g

Re: [SQL] Question on triggers and plpgsql

2005-04-08 Thread Andrew Sullivan
painful start-up possibilities with the server, you might well get a duplicate copy of a mail transmitted later. (In the present age, given the remarkable quality of networks and mail servers everyone has, you almost never have this happen any more. But it's still strictly speaking possible.)

Re: [SQL] getting count for a specific querry

2005-04-08 Thread Andrew Sullivan
On Fri, Apr 08, 2005 at 04:17:45PM +, Ragnar Hafstað wrote: > On Fri, 2005-04-08 at 11:07 -0400, Andrew Sullivan wrote: > > > > SELECT count(*) FROM tablename WHERE condition LIMIT n; > the LIMIT clause limits the number of rows returned by the select, > in this c

Re: [SQL] getting count for a specific querry

2005-04-08 Thread Andrew Sullivan
to get some EXPLAIN ANALYSE results for the offending queries in order to help you (where "handy" is read as "necessary"). A -- Andrew Sullivan | [EMAIL PROTECTED] Information security isn't a technological problem. It's an economics problem. --Bruce

Re: [SQL] Update aborted if trigger function fails?

2005-04-12 Thread Andrew Sullivan
ptional", > and that can be reconstructed easily after discovering > that the trigger function had been failing). But in If you can do some things asynchronously, and you don't care about them very much, then you can use LISTEN/NOTIFY to do such processing. A -- Andrew Sulli

Re: [SQL] row-attribute in EXPLAIN-output doesn't match count(*)

2005-04-14 Thread Andrew Sullivan
et." > mean? It means that those rows were marked invalidated after some existing transaction started. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote is not data. --Roger Brinner ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] row-attribute in EXPLAIN-output doesn't match count(*)

2005-04-14 Thread Andrew Sullivan
on. What's keeping open the transaction? A -- Andrew Sullivan | [EMAIL PROTECTED] The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun ---(end of broadcast)--- TIP 9: the

Re: [SQL] row-attribute in EXPLAIN-output doesn't match count(*)

2005-04-14 Thread Andrew Sullivan
your pool software. It's no doubt issuing "BEGIN;" as soon as it connects. It's BAD (broken as designed) in that case. You need to convince it not to do that, or else you need to go around and kill -2 such connections from time to time. A -- Andrew Sullivan | [EMAIL PR

Re: [SQL] row-attribute in EXPLAIN-output doesn't match count(*)

2005-04-14 Thread Andrew Sullivan
away if we did > that. Yeah; I seem to remember Tom Lane suggesting such an approach at one point. I had the vague idea it might happen in 8.0, but for some reason I think it didn't. (Anyway, that's probably off topic for this list.) A -- Andrew Sullivan | [EMAIL PROTECTED] When

Re: [SQL] row-attribute in EXPLAIN-output doesn't match count(*)

2005-04-14 Thread Andrew Sullivan
SIGINT. I don't know of any systems where that's not 2, but I suppose it's logically possible. As for the reconnection, it'll depend entirely on what your pool does when its connections are closed. You'll have to test it. A -- Andrew Sullivan | [EMAIL PROTECTED] Informati

Re: [SQL] Nested Sets

2005-04-16 Thread Andrew Sullivan
Everything in Postgres is always inside a transaction (although it might be a transaction of a single statement). You shouldn't need to do anything special around table locking. A -- Andrew Sullivan | [EMAIL PROTECTED] The fact that technology doesn't work is no bar to su

Re: [SQL] Query about SQL in PostgreSQL

2005-04-19 Thread Andrew Sullivan
ble-quote identifiers. I sort of don't believe exactly the original poster's report, however, because the error message wasn't right no matter what. I'd like to see a real session transcript. Also, this probably belongs on -general. A -- Andrew Sullivan | [EMAIL PROTECTED]

Re: [SQL] Matching the MYSQL "Describe " command

2005-04-24 Thread Andrew - Supernews
ed purely for the convenience of the backend. For this specific task, information_schema.columns should be pretty close to what you need. -- Andrew, Supernews http://www.supernews.com - individual and corporate NNTP services ---(end of broadcast)-

Re: [SQL] several questions about R-tree index

2005-04-26 Thread Andrew - Supernews
x using that opclass exists. The actual names of the operators are irrelevent. So for either rtree or GIST, all you need is to define your new datatype, with its associated operators, and create an operator class for it with appropriate support functions, and create indexes using that opclass. Once a

Re: [SQL] Does Postgresql have a similar pseudo-column "ROWNUM" as Oracle?

2005-05-17 Thread Andrew Sullivan
u want. I think. A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendency of modern prose is away from concreteness. --George Orwell ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [SQL] Does Postgresql have a similar pseudo-column "ROWNUM" as

2005-05-17 Thread Andrew Sullivan
my primary reason for > joining this list ;-) Well, then, table schemas, data distribution, EXPLAIN and EXPLAIN ANALYSE output, and some statement of what you're trying to get out is likely what we need to see. A -- Andrew Sullivan | [EMAIL PROTECTED] This work was visionary and imaginat

Re: [SQL] Transaction in plpgslq

2005-05-20 Thread Andrew Hammond
hen you might want to take a look at the concurrency control section of the manual. http://www.postgresql.org/docs/8.0/static/mvcc.html - -- Andrew Hammond416-673-4138[EMAIL PROTECTED] Database Administrator, Afilias Canada Corp. CB83 2838 4B67 D40F D086 3568 81FC E7E5 27AF 4A9A Rafa

Re: [SQL] Transaction in plpgslq

2005-05-24 Thread Andrew Hammond
e transaction ends. I included links to relevant documentation in my original post. If you read up on locking, you'll find the answer to your problem. Please post any further questions you have after reading the documentation. - -- Andrew Hammond416-673-4138[EMAIL PROTECTED] Database A

Re: [SQL] Duplicated records

2005-05-26 Thread Andrew Hammond
s; ALTER TABLE lanctos ALTER id SET NOT NULL; CREATE UNIQUE INDEX lanctos_id_idx ON lanctos (id); ALTER TABLE lanctos ADD CONSTRAINT lanctos_id_pkey PRIMARY KEY (id); COMMIT; As always, don't forget to ANALYZE the new table. - -- Andrew Hammond416-673-4138[EMAIL PROTECTED] Database Ad

Re: [SQL] Sum() rows

2005-05-31 Thread Andrew Hammond
(-10); INSERT 60813 1 /* [EMAIL PROTECTED]:5432/ahammond =# */ SELECT * FROM tb1; id | value - +--- 1 |20 2 | -10 (2 rows) /* [EMAIL PROTECTED]:5432/ahammond =# */ SELECT * FROM tb1_real; id | value | subtot - +---+ 1 |20 | 20 2 | -10 | 10 (2 rows

Re: [SQL] cursor "" does not exist

2005-06-16 Thread Andrew Sullivan
th autocommit off, I think what you get is no COMMIT, but you still get the bald transaction. What you really need is to make sure you're starting a multi-statement transaction every time. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote is not data. --Roger Brinner

Re: [SQL] Make COUNT(*) Faster?

2005-07-08 Thread Andrew Sullivan
st the idea of what tuple visibility. For a little more, you might want to look at the presentation Tom Lane made for this: http://www.postgresql.org/files/developer/transactions.pdf A -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting out of debt, y

Re: **SPAM** [SQL] Faster count(*)?

2005-08-10 Thread Andrew Sullivan
FWIW, this was another one of those things I must have heard a dozen times at OSCON. I suspect the simpler API would be popular, particularly since post-8.0 the estimates are more reliable than they used to be. A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendency of modern pros

Re: [SQL] DATESTYLE and 0000-00-00

2005-10-06 Thread Andrew Sullivan
and coerce them to dates when you select (but be prepared for the errors you'll get). But my suggestion is that if you really think you have to have such dates, you should redesign (which might mean "replace") your application. Anything that uses dates with a year 0 is so fundamenta

Re: [SQL] pg, mysql comparison with "group by" clause

2005-10-13 Thread Andrew Sullivan
B2 have that we don't?") A -- Andrew Sullivan | [EMAIL PROTECTED] This work was visionary and imaginative, and goes to show that visionary and imaginative work need not end up well. --Dennis Ritchie ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Update timestamp on update

2005-10-13 Thread Andrew Sullivan
xamples there that may be easier for you to understand. To use a procedural language for a trigger, you will need to install that language; see the relevant chapter for instructions on how to do so. It is not currently possible to write a SQL-language trigger function. --snip-- A -- Andrew

Re: [SQL] pg, mysql comparison with "group by" clause

2005-10-13 Thread Andrew Sullivan
it sounds like you're actually arguing for "the optimiser needs to get better". Special-purpose, formally wrong syntax is surely not better than making the optimiser get the right syntax right every time, is it? A -- Andrew Sullivan | [EMAIL PROTECTED] When my infor

Re: [SQL] cast

2005-10-14 Thread Andrew Sullivan
On Fri, Oct 14, 2005 at 01:08:43PM -0500, Judith Altamirano Figueroa wrote: > Hello I have a query that ran in 7.0.2, but in 8.0.1 does not, the query > is the next: It'd help if we could see the table schema and the error message. A -- Andrew Sullivan | [EMAIL PROTECTED] When my

Re: [SQL] why vacuum

2005-10-27 Thread Andrew Sullivan
to package it up for others, or write a proof-of-concept outline for the lists or General Bits or something like that? This is a different sort of replication people are asking for. Note that you get 2PC in the next Postgres release. A -- Andrew Sullivan | [EMAIL PROTECTED] When

Re: [SQL] why vacuum

2005-10-27 Thread Andrew Sullivan
did, how it worked, design and limitations, &c. Post it to the lists (uh, -general or maybe -hackers, I suppose), or put it on a web page or whatever. General Bits is a fairly regular column that Elein Mustain puts out. I bet she'd include a submission on this topic, although you'd

Re: [SQL] why vacuum

2005-10-28 Thread Andrew Sullivan
everyone contributes their discoveries and improvements, we all benefit. A -- Andrew Sullivan | [EMAIL PROTECTED] When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes ---(end of broadcast)---

Re: [SQL] how to do a find and replace

2005-11-18 Thread Andrew Sullivan
the last entry doesn't get pulled out. These functions work on the first hit, so this is as expected. But if you have something like '/v.0/v.myimage.jpeg' you'll not lose the 'v.' you want, I expect. A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendenc

Re: [SQL] idea for a geographically distributed database: how best to implement?

2005-11-18 Thread Andrew Sullivan
ly like to hear about it (especially if you can provide details of how you did it). If you get this working in a production system, I can think of more than one conference that would _also_ like a paper on it. A -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting

Re: [SQL] does indexes need statistics?

2005-11-25 Thread Andrew Sullivan
stics" section of the configuration file? If that's what you mean, then no. Those aren't the same thing as the statistical data used by the planner; the latter is updated when you run "analyse". A -- Andrew Sullivan | [EMAIL PROTECTED] "The year's penultim

Re: [SQL] Does VACUUM reorder tables on clustered indices

2005-12-19 Thread Andrew Sullivan
ially the same thing? A -- Andrew Sullivan | [EMAIL PROTECTED] I remember when computers were frustrating because they *did* exactly what you told them to. That actually seems sort of quaint now. --J.D. Baldwin ---(end of broadcast)---

Re: [SQL] How to Force Transactions to Process Serially on A Table

2005-12-19 Thread Andrew Sullivan
P 2: Don't 'kill -9' the postmaster > > > > -- > -Achilleus > > > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to >choose an index scan if your

Re: [SQL] Does VACUUM reorder tables on clustered indices

2005-12-22 Thread Andrew Sullivan
Given what Tom Lane recently reported (and assuming I understood his remarks), I think it's a Mighty Bad Idea to CLUSTER sl_log_1. A -- Andrew Sullivan | [EMAIL PROTECTED] In the future this spectacle of the middle classes shocking the avant- garde will probably become the te

Re: [SQL] INSERT waiting under heavy load

2006-01-08 Thread Andrew Sullivan
umber of updates, the planner always assumes an indexscan (correctly), but you end up scanning megabytes of dead tuples. With a large number of open transactions, most of the time VACUUM can't recover the space. I agree with what Tom said earlier in this thread: the design is guaranteed to lose.

Re: [SQL] Changing the transaction isolation level within the stored

2006-01-26 Thread Andrew Sullivan
ppose these are concurrent. The problem here is that each transaction need something in the other transaction either to complete or rollback before the work can proceed. So one of them has to lose. A -- Andrew Sullivan | [EMAIL PROTECTED] This work was visionary and imaginative, and goes to show

Re: [SQL] Changing the transaction isolation level within the stored

2006-01-26 Thread Andrew Sullivan
posite order, you are all but guaranteed a deadlock. MVCC helps, but it can't avoid locking the same data when that data is being updated. A -- Andrew Sullivan | [EMAIL PROTECTED] In the future this spectacle of the middle classes shocking the avant- garde will probably become the textb

Re: [SQL] Does PostgreSQL support job?

2006-02-01 Thread Andrew Sullivan
ron" (since you mention it). Yes, use that. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote is not data. --Roger Brinner ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Syntax for "IF" clause in SELECT

2006-02-09 Thread Andrew Sullivan
rum end), > > ... > > > > or if you are just trying to replace nulls, then try COALESCE > > > > ---(end of broadcast)--- > > TIP 1: 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 -- Andrew Sullivan | [EMAIL PROTECTED] It is above all style through which power defers to reason. --J. Robert Oppenheimer ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] Modifying postgresql.org file

2006-02-15 Thread Andrew Sullivan
mbering, the work_mem setting isn't in 7.4. You can check the docs on postgresql.org. There's a whole section on the configuration variables, and manuals are available for several releases back. A -- Andrew Sullivan | [EMAIL PROTECTED] Information security isn'

Re: [SQL] Modifying postgresql.org file

2006-02-15 Thread Andrew Sullivan
be under /usr/share/doc/. A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendency of modern prose is away from concreteness. --George Orwell ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] How to force PostgreSQL using an index

2006-02-15 Thread Andrew Sullivan
it thinks it knows about your environment. A -- Andrew Sullivan | [EMAIL PROTECTED] If they don't do anything, we don't need their acronym. --Josh Hamilton, on the US FEMA ---(end of broadcast)--- TIP 9: In versions below 8.0,

Re: [SQL] How to force PostgreSQL using an index

2006-02-15 Thread Andrew Sullivan
is is to fiddle with the SET STATISTICS settings on the column(s) in question. You might find that as the samples get better, your index turns out to be usefully selective, and it gets chosen. But to answer your question, no, you can't tell it "use index foo". A -- Andrew Sul

Re: [SQL] Using EXPLAIN-ANALYZE

2006-02-16 Thread Andrew Sullivan
hdocs.postgresql.org/oscon2005/robert.treat/OSCON_Explaining_Explain_Public.sxi>) A -- Andrew Sullivan | [EMAIL PROTECTED] In the future this spectacle of the middle classes shocking the avant- garde will probably become the textbook definition of Postmodernism. --Brad Holland

Re: [SQL] Using EXPLAIN-ANALYZE

2006-02-16 Thread Andrew Sullivan
ery plan is affected by the nature of your data. That's what the ANALYZE command (on its own, or with VACUUM) is for. A > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Sullivan > Sent: Thursday, February 16, 2006 12:39 PM

Re: [SQL] Update in all tables

2006-02-22 Thread Andrew Sullivan
have to update more than one table (which is why there isn't a way to do this automatically). A -- Andrew Sullivan | [EMAIL PROTECTED] Unfortunately reformatting the Internet is a little more painful than reformatting your hard drive when it gets out of whack. --Scott Mo

Re: [SQL] Question about index scan vs seq scan when using count()

2006-02-23 Thread Andrew Sullivan
is that? How many rows? EXPLAIN ANALYSE will tell you if you have the right plan (estimate vs. actual). The real question is, are you sure an indexscan is faster? A -- Andrew Sullivan | [EMAIL PROTECTED] It is above all style through which power defers to reason.

Re: [SQL] Question about index scan vs seq scan when using count()

2006-02-23 Thread Andrew Sullivan
e 600 rows is so small that a seqscan's just as fast. A -- Andrew Sullivan | [EMAIL PROTECTED] "The year's penultimate month" is not in truth a good way of saying November. --H.W. Fowler ---(end of broadcast)-

Re: [SQL] Can't connect to the db

2006-02-24 Thread Andrew Sullivan
: 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 -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting out of debt, yet are against all t

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-01 Thread Andrew Sullivan
llow you to rollback at that point and still leave the UPDATE in place. A -- Andrew Sullivan | [EMAIL PROTECTED] The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun ---(end of broadcast)

Re: [SQL] Replication - state of the art?

2006-03-01 Thread Andrew Sullivan
> Anyone here using replication or transaction journaling? Has it proved > reliable, easy to maintain? Define "easy". Every possible replication system is going to have slightly grotty corners into which you find yourself wandering. The question is merely whether the room is octa

Re: [SQL] Change date format through an environmental variable?

2006-03-01 Thread Andrew Sullivan
an environment variable. You can alter the postgresql.conf file, though. A -- Andrew Sullivan | [EMAIL PROTECTED] When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes ---(end of broadcast)-

Re: [SQL] Change date format through an environmental variable?

2006-03-01 Thread Andrew Sullivan
t modifying for other clients, AFAIK, just for you. (If that's what you want, well, good, but it's important to know what it does.) The list for 8.1 is in the docs: http://www.postgresql.org/docs/8.1/interactive/libpq-envars.html A -- Andrew Sullivan | [EMAIL PROTECTED] A certain des

Re: [SQL] Replication - state of the art?

2006-03-01 Thread Andrew Sullivan
onds). But > risk -- of data corruption -- > and time --too much-- will can the project. Another big reason to use a live-standby system like Slony is that once you have the extra database online, you suddenly think of all sorts of nifty queries you can move there without destroying your producti

Re: [SQL] Replication - state of the art?

2006-03-01 Thread Andrew Sullivan
backup > machine. Do the sync once a minute, and at most you lose 60 seconds of > data. Right. But you have to write all of that, and write the failover scripts, and such like. And the OP suggested that there wasn't time budget for that. But it'd work. A -- Andrew Sullivan |

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-02 Thread Andrew Sullivan
ASCADE. My suggestion won't work for that, I don't think (but it might be worth a try). The only other thing I can think of is just flag everything, and use a daemon to go around and perform the actual deletes for you. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote i

Re: [SQL] Help with trigger that updates a row prior to a potentially aborted deletion?

2006-03-03 Thread Andrew Sullivan
On Fri, Mar 03, 2006 at 12:19:22AM -, Simon Kinsella wrote: > Hi Andrew, > > I think I may have cracked this problem by combining a RULE ON DELETE which > calls a function instead of the standard DELETE op. No triggers. It was a Ah. Yes, likely. Yeah, you can't do tha

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Andrew Sullivan
CC) 3.2.3 ^ you need to upgrade PostgreSQL Right Now. There are serious problems with earlier 7.4 releases. Get the latest, or risk data corruption. A -- Andrew Sullivan | [EMAIL PROTECTED] When my information changes, I alter my conclusions. What do you d

Re: [SQL] Sequential scan where Index scan expected (update)

2006-03-03 Thread Andrew Sullivan
ble statistics? I turn them on, in a session, as > user postgres, but get nothing: You have to SIGHUP to get those to take effect, IIRC. A -- Andrew Sullivan | [EMAIL PROTECTED] Information security isn't a technological problem. It's an economics problem. --Bruce

Re: [SQL] "could not open file" issue

2006-04-24 Thread Andrew Sullivan
oughta take this over to -general to see if the wizards can identify your problem. (But check your hardware first.) A -- Andrew Sullivan | [EMAIL PROTECTED] "The year's penultimate month" is not in truth a good way of saying November. --H.W. Fowler

Re: [SQL] any one can help me how to get multiple rows in postgresql using arrays in functions

2006-04-27 Thread Andrew Sullivan
On Thu, Apr 27, 2006 at 04:57:26PM +0530, Penchalaiah P. wrote: > any one can help me how to get multiple rows in postgresql using arrays > in functions What is it you are trying to do? A -- Andrew Sullivan | [EMAIL PROTECTED] Information security isn't a technological proble

Re: [SQL] ERROR: plan should not reference subplan's variable

2006-05-03 Thread Andrew Sullivan
uld get it directly from CVS and build it yourself. Directions for doing this are on the website (possibly in the developer's section, note). A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendency of modern prose is away from concreteness. --George Orwell --

Re: [SQL] i am getting error when i am using copy command

2006-05-03 Thread Andrew Sullivan
machine you're running psql from. If you want local files, you need to use \copy instead. A -- Andrew Sullivan | [EMAIL PROTECTED] It is above all style through which power defers to reason. --J. Robert Oppenheimer ---(end of broadcast)-

Re: [SQL] is an explicit lock necessary?

2006-05-04 Thread Andrew Sullivan
). The docs explain how this works. A -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting out of debt, yet are against all taxes for raising money to pay it off. --Alexander Hamilton ---(end of broadcast)-

Re: [SQL] Help with a seq scan on multi-million row table

2006-05-11 Thread Andrew Sullivan
e statistics target value for this > column? > > Ah, I think I found the place: No. Just ALTER TABLE [name] ALTER [column] SET STATISTICS. See http://www.postgresql.org/docs/8.1/interactive/sql-altertable.html for more. You'll need to ANALYSE afterwards. A -- Andrew Sullivan | [

Re: [SQL] Add column and specify the column position in a table

2006-05-18 Thread Andrew Sullivan
al layout of the columns should not be of concern to the developer, who should be naming the columns anyway. A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendency of modern prose is away from concreteness. --George Orwell ---(end of broadcas

Re: [SQL] PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly

2006-05-24 Thread Andrew Sullivan
. Note that the sequence does not guarantee no gaps, however. A -- Andrew Sullivan | [EMAIL PROTECTED] The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun ---(end of broadcast)--

Re: [SQL] PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly

2006-05-26 Thread Andrew Sullivan
empseq; SELECT nextval('tempseq') as rank, testeridpk, tester_name FROM testers ORDER BY testeridpk; ROLLBACK; which, I _think_, will get you what you want (i.e. that's not tested). The ROLLBACK is just there to clean up the sequence. A -- Andrew Sullivan | [EMAIL PRO

Re: [SQL] hi how to use encryption for incomtax in postgresql

2006-05-26 Thread Andrew Sullivan
On Fri, May 26, 2006 at 04:01:47PM +0530, Penchalaiah P. wrote: > hi sir > > > > how to use encryption to password in postgresql with examples I guess you want to read this: http://www.postgresql.org/docs/8.1/interactive/client-authentication.html ? A -- Andrew Sul

Re: [SQL] PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly

2006-05-26 Thread Andrew Sullivan
t also starts at 1. I don't actually know what this ranking is useful for, to be honest, but people ask for it, and this is a stupid Postgres trick that can make it happen. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote is not data. --Ro

Re: [SQL] hi still i am unable to provide encryption to a particular table....

2006-05-29 Thread Andrew Sullivan
d5 for that. If you want something more, use the pgcrypto contrib/ items. A -- Andrew Sullivan | [EMAIL PROTECTED] "The year's penultimate month" is not in truth a good way of saying November. --H.W. Fowler ---(end of broadcast)

Re: [SQL] Using Query Result in WHERE Clause

2006-06-05 Thread Andrew Sullivan
you what you want. I won't warrant what the performance will be, however. A -- Andrew Sullivan | [EMAIL PROTECTED] If they don't do anything, we don't need their acronym. --Josh Hamilton, on the US FEMA ---(end of broadcast)---

Re: [SQL] Update Problem

2006-06-06 Thread Andrew Sullivan
On Tue, Jun 06, 2006 at 01:04:26PM -, Christian Paul Cosinas wrote: > > > Sometimes only column1 and column2 is updated and column3 is not updated. Column 3 was already set to 08:00 AM? A -- Andrew Sullivan | [EMAIL PROTECTED] In the future this spectacle of the middle classes

Re: [SQL] Advanced Query

2006-06-06 Thread Andrew Sullivan
nt of the list is indeed to answer "how do I do this with SQL"? If one doesn't want to see such questions, one might unsubscribe. -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting out of debt, yet are against all taxes for raising money to pay it

Re: [SQL] Advanced Query

2006-06-06 Thread Andrew Sullivan
e tone of the mailing lists might be maintained in much the high one demonstrated by such polite, helpful, and smarter-than-me people as those on the PostgreSQL core team. I note that the above troll does not qualify. I suggest people avoid feeding it. A -- Andrew Sullivan | [EMAIL PROTECTED] In

Re: [SQL] Join issue

2006-06-06 Thread Andrew Sullivan
before a > contract is signed. I don't have a proposal to rewrite, but I suspec this is going to be easier with a query to get the latest provider rate in the FROM clause. A -- Andrew Sullivan | [EMAIL PROTECTED] Users never remark, "Wow, this software may be buggy and hard to use, b

Re: [SQL] Good examples of calling slony stored procedures

2006-06-14 Thread Andrew Sullivan
On Wed, Jun 14, 2006 at 08:55:21AM -0700, Mark Adan wrote: > Hi Jim > > I looked there already and didn't find what I needed. I saw this web But the mailing list link is at the top of that page: http://gborg.postgresql.org/mailman/listinfo/slony1 A -- Andrew Sullivan | [E

Re: [SQL] UTF-8 Problem ?

2006-06-15 Thread Andrew Sullivan
id UTF-8 byte sequence detected near byte 0xdf Sounds like your client is sending something other than UTF-8. Is it? A -- Andrew Sullivan | [EMAIL PROTECTED] The whole tendency of modern prose is away from concreteness. --George Orwell ---(end of broadcas

<    1   2   3   4   >