[GENERAL] Postgres SQL Syntax

2007-02-01 Thread Jim C.
I've a postgres statement that reads: CREATE TABLE "channel" ( "chanid" int NOT NULL default '0', "channum" varchar(10) NOT NULL default '', "freqid" varchar(10) default NULL, "sourceid" int default NULL, . . . PRIMARY KEY ("chanid"), KEY "channel_s

Re: [GENERAL] Postgres SQL Syntax

2007-02-05 Thread Jim C.
> ); I'm doing this table by table, line by line. Each table, I learn something new about the differences between MySQL and Postgres, I mentally catalog it and I can always look it up in my own code next time for examples. I've a tool that is providing some help but sometimes it chok

Re: [GENERAL] Postgres SQL Syntax

2007-02-05 Thread Jim C.
t for a week now. I've got to say that it pains me to know that there is apparently no open standard in use for importing/exporting data from one db to another. XML would do the job, wouldn't it? If I'm wrong, I sure would like to hear about it. Jim C. --

[GENERAL] Re: Production systems beware: U.S. Daylight Savings Time comes at a new time this year

2007-02-05 Thread Jim C.
John D. Burger wrote: > Sorry if I'm the only one to find this amusing, but I see that the > original message was sent twenty minutes =after= I received it. :) Probably sent from a different time zone. Jim C. ---(end of broadcast)--

Re: [GENERAL] Postgres SQL Syntax

2007-02-06 Thread Jim C.
uccess with one or two but mostly they didn't work. The article at this site seems good at first blush but then one notices that it doesn't seem to have been updated any time in the last five years. Jim C. signature.asc Description: OpenPGP digital signature

Re: [GENERAL] Postgres SQL Syntax

2007-02-08 Thread Jim C.
Richard Huxton wrote: > Jim C. wrote: >>> You probably want one of the mysql converter projects, e.g. >>> http://pgfoundry.org/projects/mysql2pgsql/ >>> Also read the "converting from other databases" section here: >>> http://www.postgresql.o

Re: [HACKERS] [GENERAL] Checkpoint request failed on version 8.2.1.

2007-01-13 Thread Jim C. Nasby
On Thu, Jan 11, 2007 at 06:04:56PM -0500, Andrew Dunstan wrote: > Please don't. At least not on the PostgreSQL web site nor in the docs. > And no, I don't run my production servers on Windows either. > > For good or ill, we made a decision years ago to do a proper Windows > port. I think that it

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-21 Thread Jim C. Nasby
On Sun, Jan 21, 2007 at 11:39:45AM +, Heikki Linnakangas wrote: > Russell Smith wrote: > >Strange idea that I haven't researched, Given Vacuum can't be run in a > >transaction, it is possible at a certain point to quit the current > >transaction and start another one. There has been much ch

Re: [GENERAL] Alter definition of a column

2007-01-21 Thread Jim C. Nasby
On Sat, Jan 20, 2007 at 11:19:50AM -0600, Kelly Burkhart wrote: > On 1/20/07, Shoaib Mir <[EMAIL PROTECTED]> wrote: > >Should help --> ALTER TABLE tablename ALTER columname TYPE text; > > I was looking for a way to alter a column from varchar(n) to text > without using the alter command and conseq

Re: [GENERAL] postgresql scalability, active-active cluster

2007-01-21 Thread Jim C. Nasby
On Sun, Jan 21, 2007 at 06:55:56AM -0800, brian stone wrote: > Are there any built in tools or 3rd party tools for distributing a postgresql > database? I need an active active configuration; master-master with fail > over. The project I am working needs to support a very large number of > tra

Re: [GENERAL] Migrate 8.0 dump to 7.4

2007-01-21 Thread Jim C. Nasby
On Sun, Jan 21, 2007 at 12:27:41PM -0500, Jaime Casanova wrote: > On 1/21/07, mbneto <[EMAIL PROTECTED]> wrote: > >Hi, > > > >I have a dumpall file generated from a 8.0 version that I need to import > >back to a 7.4 server. > > > >Is there a way to do that? > > > >a psql -f db.out template1 gives m

Re: [GENERAL] Subject: Postgres processes have a burst of CPU usage

2007-01-25 Thread Jim C. Nasby
On Tue, Jan 23, 2007 at 07:47:26AM -0800, Subramaniam Aiylam wrote: > Hello all, > > I have a setup in which four client machines access > a Postgres database (8.1.1) running on a Linux box. > So, there are connections from each machine to the > database; hence, the Linux box has about 2 postgre

Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 01:49:06PM +1300, Andrej Ricnik-Bay wrote: > On 2/23/07, Jim Nasby <[EMAIL PROTECTED]> wrote: > >That depends greatly on what you're doing with it. Generally, as soon > >as you start throwing a multi-user workload at it, MySQL stops > >scaling. http://tweakers.net recently d

Re: [GENERAL] Ruby on Rails for PostgreSQL

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 01:25:25PM +, Dave Page wrote: > Given the recent discussions of applications stacks, PHP & Ruby etc. it > seems an ideal time for me to introduce a project I've been working on. > > StackBuilder is an extension of the Windows installer for PostgreSQL > that will allow

Re: [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 04:08:45PM -0300, Alvaro Herrera wrote: > Mark Stosberg wrote: > > I just tried to add something to the pg_autovacuum table for the first > > time today (with 8.1). I wanted to make the simplest possible entry: > > Disable auto-vacuuming for a table. However, the data model

Re: [GENERAL] Priorities for users or queries?

2007-02-23 Thread Jim C. Nasby
ike schedulers. Actually, I believe part of the discussion also involved how to handle long-running workloads that you don't want to monopolize the machine. -- Jim C. Nasby, Database Architect[EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #182

Re: [HACKERS] [GENERAL] pg_autovacuum should allow NULL values

2007-02-23 Thread Jim C. Nasby
On Fri, Feb 23, 2007 at 06:47:52PM -0500, Tom Lane wrote: > I wrote: > > I don't find this particularly important, because we have never intended > > direct update of catalog entries to be a primary way of interacting with > > the system. The current pg_autovacuum setup is a stopgap until the dust

Re: [GENERAL] How often do I need to reindex tables?

2007-02-27 Thread Jim C. Nasby
On Tue, Feb 27, 2007 at 11:26:02AM -0800, Dhaval Shah wrote: > I am planning to use 8.2 and the average inserts/deletes and updates > across all tables is moderate. That is, it is a moderate sized > database with moderate usage of tables. > > Given that, how often do I need to reindex the tables?

Re: [GENERAL] Difference between UNIQUE constraint vs index

2007-02-27 Thread Jim C. Nasby
On Tue, Feb 27, 2007 at 06:43:51PM -0600, John Jawed wrote: > Is there any difference as far as when the "uniqueness" of values is > checked in DML between a unique index vs a unique constraint? Or is > the only difference syntax between unique indices and constraints in > PostgreSQL? Syntax only,

Re: [GENERAL] Difference between UNIQUE constraint vs index

2007-02-27 Thread Jim C. Nasby
rally a SELECT) with certain conditions, the planner can make use of the knowledge that a column or set of columns is guaranteed to be unique. PostgreSQL currently can't do that. > John > > On 2/27/07, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > >On Tue, Feb 27, 2007 at

Re: [GENERAL] [ADMIN] increasing of the shared memory does not solve the problem of "OUT of shared memory"

2007-05-12 Thread Jim C. Nasby
On Fri, May 11, 2007 at 04:58:28PM +0300, Sorin N. Ciolofan wrote: > I increased significantly the number of shared buffers from 3000 to 100 000 > (80Mb) BTW, 100,000 shared buffers is actually 800MB, not 80. -- Jim Nasby[EMAIL PROTECTED] EnterpriseDB

Re: [GENERAL] PITR and tar

2007-05-13 Thread Jim C. Nasby
Moving to -docs... Does anyone know what the history of the docs saying that GNU tar had issues with files changing underneath it? According to this report it's actually BSD tar that has the issue. On Wed, May 09, 2007 at 10:19:05AM -0700, Jeff Davis wrote: > On Wed, 2007-05-09 at 11:40 -0500, Ji

Re: [GENERAL] Internals of PostgreSQL - Documentation or presentations

2007-05-13 Thread Jim C. Nasby
On Sun, May 13, 2007 at 08:44:48PM +0200, Gerhard Wiesinger wrote: > Are there some presentations or documents of the internals of PostgreSQL > available? > > Especially I'm looking for the concepts and detailed internals of general > transaction handling, internals of commit log, transaction lo

Re: [GENERAL] How access table by tableoid

2007-05-13 Thread Jim C. Nasby
On Sun, May 13, 2007 at 09:25:37PM +0200, Felix Kater wrote: > can I use a given tableoid (instead of the tablename) to select > columns from that table somehow? > > SELECT * FROM ??tableoid?? > So, I worked around that by peforming two queries: The first to retrieve > the table's name from pg_c

Re: [GENERAL] Vacuum non-clustered tables only

2007-05-16 Thread Jim C. Nasby
On Wed, May 16, 2007 at 03:40:27PM -0700, Glen Parker wrote: > I think I know the answer to this, but... > > Is there a semi-easy way vacuum all tables in a database *except* those > that are clustered? You could query for tables that aren't clustered and use that to build a list of VACUUM comm

Re: [GENERAL] Large Database Restore

2007-05-17 Thread Jim C. Nasby
On Thu, May 17, 2007 at 08:19:08AM -0500, Lee Keel wrote: > I am restoring a 51GB backup file that has been running for almost 26 hours. > There have been no errors and things are still working. I have turned fsync > off, but that still did not speed things up. Can anyone provide me with the > op

Re: [GENERAL] About "ERROR: must be *superuser* to COPY to or from a file"

2005-08-30 Thread Jim C. Nasby
people think about the Oracle method where bulk data operations can only occur in a specified directory? Making that restriction might address some of the security concerns. I don't think we should change COPY in such a way that you *have* to use a specified directory, but if it was an option

Re: [GENERAL] optimum settings for dedicated box

2005-08-30 Thread Jim C. Nasby
I set it to 10MB. That means (to me, anyway) that > work_mem will never gobble more then 100MB. Seems OK since I have > 1GB. That's not totally true. A single query can use work_mem for multiple steps, so if work_mem is 10MB a single query could end up using 20MB, 30MB, or even mor

Re: [GENERAL] newbie - postgresql or mysql

2005-08-31 Thread Jim C. Nasby
, 'Software - Network', 2, '2004-10-12 10:50:04'), > (14, 'Software - Midrange, AS/400', 2, '2004-10-12 10:50:04'), > (15, 'Software - Server', 2, '2004-10-12 10:50:04'), > (16, 'Hardware - Wyse Terminal', 2, '2004-10-12 10:50

Re: [GENERAL] newbie - postgresql or mysql

2005-08-31 Thread Jim C. Nasby
gt; >> (13, 'Software - Network', 2, '2004-10-12 10:50:04'), > >> (14, 'Software - Midrange, AS/400', 2, '2004-10-12 10:50:04'), > >> (15, 'Software - Server', 2, '2004-10-12 10:50:04'), > >> (16, 'Hardware - Wyse Terminal&#x

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Jim C. Nasby
ase will be hosed. I thought PostgreSQL already had such a safeguard? Or is it only against starting two backends against the same PGDATA on the same machine? -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcar

Re: [GENERAL] Debug plpgSQL stored procedures

2005-09-06 Thread Jim C. Nasby
ocking these days. Especially > with 8.0 on Windows. I was really impressed how far it has come since > the 6.x days running on Cygwin. 3rd hit on google: http://www.sqlmanager.net/products/postgresql/manager/documentation/hs20160.html -- Jim C. Nasby, Sr. Engineering Consultant

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Jim C. Nasby
On Tue, Sep 06, 2005 at 02:58:52PM -0500, Bruno Wolff III wrote: > On Tue, Sep 06, 2005 at 13:47:42 -0500, > "Jim C. Nasby" <[EMAIL PROTECTED]> wrote: > > On Tue, Sep 06, 2005 at 10:13:33AM -0500, Bruno Wolff III wrote: > > > On Mon, Sep 05, 2005 at 12:20:

Re: [GENERAL] How to write jobs in postgresql

2005-09-06 Thread Jim C. Nasby
lt or impossible to do with cron become available, such as sub-minute scheduling (ie: every 30 seconds), running something at server start-up/shut-down, running something based on a notify, etc. I encourage anyone who's interested in this to join the mailing list at http://lists.pgfoundr

Re: [GENERAL] Shared disk storage

2005-09-06 Thread Jim C. Nasby
pretty easy to do, so why not help those who could make use of it? -- 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-569-9461 --

Re: [GENERAL] RAID0 and pg_xlog

2005-09-07 Thread Jim C. Nasby
On Wed, Sep 07, 2005 at 12:47:43PM -0700, Qingqing Zhuo wrote: > Xlog will be the only believable data if your system crashed. So it is a > dangerous practice to put xlog stuff in RAID0. No more or less so than putting your main database on RAID0. If any drive fails, you lose everything. -

Re: [GENERAL] RAID0 and pg_xlog

2005-09-07 Thread Jim C. Nasby
On Wed, Sep 07, 2005 at 01:02:18PM -0500, Scott Marlowe wrote: > On Wed, 2005-09-07 at 12:40, Jim C. Nasby wrote: > > On Wed, Sep 07, 2005 at 12:47:43PM -0700, Qingqing Zhuo wrote: > > > Xlog will be the only believable data if your system crashed. So it is a > > > dan

Re: [GENERAL] How to write jobs in postgresql

2005-09-09 Thread Jim C. Nasby
>> > >> > >Cron can log to syslog. > > > >Karsten > > > > > And your cron scripts could log to your database log tables if that is > what you were getting at... True and true, but both of those require more work to setup. I'm not even sure i

Re: [GENERAL] RAID0 and pg_xlog

2005-09-09 Thread Jim C. Nasby
On Fri, Sep 09, 2005 at 09:43:56AM -0500, Scott Marlowe wrote: > On Wed, 2005-09-07 at 16:15, Jim C. Nasby wrote: > > On Wed, Sep 07, 2005 at 01:02:18PM -0500, Scott Marlowe wrote: > > > On Wed, 2005-09-07 at 12:40, Jim C. Nasby wrote: > > > > On Wed, Sep 07, 2005

Re: [GENERAL] Cost based SELECT/UPDATE

2005-09-09 Thread Jim C. Nasby
ODO for this, since it's something that's asked about fairly often. * Provide a means for individual queries to be run at a lower priority While nice allows this for CPU-bound queries, it generally doesn't work for I/O bound queries. -- Jim C. Nasby, Sr. Engineering Consultant

Re: [GENERAL] Support for Limit in Update, Insert...

2005-09-09 Thread Jim C. Nasby
tid HINT: Use an explicit ordering operator or modify the query. ERROR: could not identify an ordering operator for type tid HINT: Use an explicit ordering operator or modify the query. decibel=# -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software

Re: [GENERAL] SQL - planet redundant data

2005-09-09 Thread Jim C. Nasby
-sql/logdb/ has an example of this. -- 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-569-9461 ---(end of broadcast)--

Re: [GENERAL] RAID0 and pg_xlog

2005-09-09 Thread Jim C. Nasby
ngs like random() and such. > > Now, if you're arguing against statement based replication, that I can > understand. but pgpool can definitely do two box sync replication. Oh, I didn't realize that. Though I have to wonder why they duplicated what pgcluster provides... -- Jim

Re: [GENERAL] Support for Limit in Update, Insert...

2005-09-09 Thread Jim C. Nasby
On Fri, Sep 09, 2005 at 06:42:10PM -0500, Jim C. Nasby wrote: > On Thu, Sep 08, 2005 at 10:49:25PM -0400, Tom Lane wrote: > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > This has been discussed before, and rejected. Please see the archives. > > > > For SE

Re: [GENERAL] SQL - planet redundant data

2005-09-17 Thread Jim C. Nasby
ry time the combination of (a, b) changes, Oracle stores a special record of some kind that indicates the change, and it doesn't store a or b with each row. (Note that I'm guessing on syntax, it's been a while since I've used Oracle). > ## > > Ji

Re: [GENERAL] How to check is the table system

2005-09-18 Thread Jim C. Nasby
le strict; create or replace function _pg_sv_temp_schema(name) returns boolean as 'select $1 like ''pg!_temp!_%'' escape ''!'' ' language sql immutable strict; Of course, as others have mentioned, that won't work if you're pre-schem

Re: [GENERAL] BIG installations of PostgresQL?

2005-09-18 Thread Jim C. Nasby
ts, high traffic volumes, high update rates, > etc, particularly large, recognizable names. I know you guys get this > question a lot, but can anyone share experiences with using Postgres in > large settings with huge query rates, replication, etc? Any stories you > guys can share (in p

Re: [GENERAL] ltree and ordering - what index?

2005-09-18 Thread Jim C. Nasby
nd region = yyy order by category, > region, price limit 10; > which worked blazingly fast. > > but what do i do when i store category and region information as ltrees? > what indices to use? how to build a query? > > any help? > any more information i should give? > we

Re: [GENERAL] Query Cost

2005-09-18 Thread Jim C. Nasby
aster because the optimizer can discard it right off the bat. -- 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-569-9461 ---(end of broa

Re: [GENERAL] ltree and ordering - what index?

2005-09-20 Thread Jim C. Nasby
On Mon, Sep 19, 2005 at 07:23:54AM +0200, hubert depesz lubaczewski wrote: > On 9/18/05, Jim C. Nasby <[EMAIL PROTECTED]> wrote: > > > > ltree is part of contrib, right? > > > > yes. > > You probably need to define a functional index of some kind. How a

Re: [GENERAL] running vacuum in scripts

2005-09-20 Thread Jim C. Nasby
It does sound like what > I was looking for. http://cvs.distributed.net/viewcvs.cgi/stats-sql/tools/ has some scripts you might find useful for running autovacuum. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231

Re: [GENERAL] database update question

2005-09-22 Thread Jim C. Nasby
with the main database on the linux server? There is only one > table that needs to be updated. > > TIA > > Art > > ---(end of broadcast)--- > TIP 3: Have you checked our extensive FAQ? > > http://www.po

Re: [GENERAL] Lines of code in PG 8.0 & 8.1?

2005-09-22 Thread Jim C. Nasby
ostgreSQL: Past, Present, and Future > (Bruce Momjian) > > -- > Rafael Martinez, <[EMAIL PROTECTED]> > Center for Information Technology Services > University of Oslo, Norway > > PGP Public Key: http://folk.uio.no/rafael/ -- Jim C. Nasby, Sr

Re: [GENERAL] Lines of code in PG 8.0 & 8.1?

2005-09-22 Thread Jim C. Nasby
t; > > PGP Public Key: http://folk.uio.no/rafael/ > -- End of PGP section, PGP failed! > > -- > Bruce Momjian| http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 359-1001 > + If your life is a hard drive, | 13 Roberts Road > +

Re: [GENERAL] How many insert + update should one transaction

2005-09-24 Thread Jim C. Nasby
te transaction. > > If you need that table to always have the old or new tuples (i.e. never > be empty) and you can afford the very lengthy vacuum full on the 5 > million dead rows, then that method will give you the best select > performance the rest of the day. > >

[GENERAL] What is an 'unused item pointer'

2005-09-24 Thread Jim C. Nasby
I can't seem to find info about this in the docs, or on the web. -- 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-569

Re: [GENERAL] What is an 'unused item pointer'

2005-09-24 Thread Jim C. Nasby
On Sat, Sep 24, 2005 at 07:19:10PM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > I can't seem to find info about this in the docs, or on the web. > > http://developer.postgresql.org/docs/postgres/storage-page-layout.html > &g

Re: [GENERAL] createdb problem

2005-09-24 Thread Jim C. Nasby
ed very slow. > > How can I make it go fast again? > Thank you. > > > ---(end of broadcast)--- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > -- Jim C. Nasby, Sr. En

Re: [GENERAL] What is an 'unused item pointer'

2005-09-26 Thread Jim C. Nasby
On Sun, Sep 25, 2005 at 12:09:24AM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > On Sat, Sep 24, 2005 at 07:19:10PM -0400, Tom Lane wrote: > >> Currently, when a tuple is reclaimed by VACUUM, we just mark its item > >> pointer as

Re: [GENERAL] insertion becoming slow

2005-09-26 Thread Jim C. Nasby
g from scratch, don't create the indexes until after the load is done. -- 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-569-9461 ---

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-26 Thread Jim C. Nasby
cally, anything trying to access the old table will block for a while waiting for the update to happen. But keep in mind that 'a while' will depend on what's happening on the system. Imagine... Start long transaction involving table Run code above; drop aquires lock on table

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-29 Thread Jim C. Nasby
I *think* that DROP will. So it will be slightly faster. In either case, if a user is running a long transaction on the old table when you try and rename/drop it, that is going to completely swamp the effects of everything else. So, if you have some long-running queries that use that table, there is going

Re: [GENERAL] insertion becoming slow

2005-09-29 Thread Jim C. Nasby
ope with it or > just accept that it works like this... > > Cheers, > Csaba. I can't think of any explanation for this off-hand. Can you re-run the test on a table that doesn't have a bunch of free space in it to see if that's what the issue was? -- Jim C. Nasby, Sr

Re: [GENERAL] Performance woes relating to DISTINCT (I think)

2005-09-29 Thread Jim C. Nasby
the database the exact info it needs to answer your real question, it can use a much, much more selective index scan. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf

Re: [GENERAL] [SQL] add column if doesn't exist (fwd)

2005-09-29 Thread Jim C. Nasby
e and checking the output? > > > > Take a look at pg_attribute system table. > http://www.postgresql.org/docs/8.0/static/catalog-pg-attribute.html You might find the information_schema or pg_newsysviews (http://pgfoundry.org/projects/newsysviews/) easier to use. -- Jim C. Nasby, Sr.

Re: [GENERAL] insertion becoming slow

2005-09-29 Thread Jim C. Nasby
: http://www.postgresql.org/docs/8.0/interactive/wal.html -- 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-569-9461 ---(end of broadcast)-

Re: [GENERAL] Query Question

2005-09-29 Thread Jim C. Nasby
to know if > one of the workers has workers.ib = 't' set if this is true I like to > have 't' returned else a 'f' > > Is this possible in a single query? > > > Sincerely, > > Frodo Larik > > > > > > --

Re: [GENERAL] database bloat, but vacuums are done, and fsm seems to be setup ok

2005-09-30 Thread Jim C. Nasby
ple, multi-column, partial and multi-column > partial indices. we do not have functional indices. > > database has quite huge load of updates, but i thought that vacum will guard > me from database bloat, but from what i observed it means that vacuuming of > b-tree indices is

Re: [GENERAL] Query optimization

2005-10-01 Thread Jim C. Nasby
iven that it's scanning 24M rows. An index on abs(tend-tstart) might help eliminate that. It will also probably help if you increase the statistics_target for u_all_est_mrna, since it might be best to join before filtering on abs(tend-tstart), which is the opposite of what it's doing n

Re: [GENERAL] Exporting just schema/metadata (w/o data) in Postgres

2005-10-01 Thread Jim C. Nasby
> Joshua D. Drake > > > > > > > > > > Thanks in advance. > > > > > > > > > -- > > Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240 > > PostgreSQL Replication, Consulting, Custom Programming, 24x7 support

Re: [GENERAL] Get all table names that have a specific column

2005-10-04 Thread Jim C. Nasby
anks a lot, > Emi > > > > > > > > ---(end of broadcast)--- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > -- Jim C. Nasby, Sr. Engineering Consult

Re: [GENERAL] Maximum # of schemas

2005-10-04 Thread Jim C. Nasby
es > gracefully with huge directories, you probably want to avoid having more > than a few thousand files per directory. (As of PG 8.0 you can work > around this to some extent by segregating tables into different > tablespaces.) Some of the "\ commands" in psql will al

Re: [GENERAL] [INTERFACES] how to monitor dead connections to postgresql database

2005-10-04 Thread Jim C. Nasby
general. You can query from pg_stat_activity: SELECT * FROM pg_stat_activity; or SELECT count(*) FROM pg_stat_activity; -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf

Re: [GENERAL] Avoiding evaluating functions twice.

2005-10-04 Thread Jim C. Nasby
ve_function is evaluated twice (if > > > it's not null) ? > > > > You can do something like this: > > > > select f from > > (select expensive_function(table) as f from table offset 0) ss > > where f is not null; Why the offset 0? -- Jim C. Nasby,

Re: [GENERAL] optimizing common subqueries

2005-10-05 Thread Jim C. Nasby
27;mycn','trka') > > might be a candidate for such treatment. > > - John Burger > MITRE > > > ---(end of broadcast)--- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgr

Re: [GENERAL] Untyped result (setof / rowset) from Functions ?

2005-10-05 Thread Jim C. Nasby
'select proname, prosrc from pg_proc') >AS t1(proname name, prosrc text) > WHERE proname LIKE 'bytea%'; > > -- >Richard Huxton >Archonet Ltd > > > > ---(end of broadcast)-------

Re: [GENERAL] transaction toggling

2005-10-05 Thread Jim C. Nasby
into queue_table Then periodically delete from that table using a plpgsql function that can catch a row count, and use that row count to update your views table. But remember the first rule of performance tuning: don't. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Perv

Re: [GENERAL] Or selection on index versus union

2005-10-05 Thread Jim C. Nasby
clusive lock on the table it grabs. > I'm not a database administrator, and I'm afraid it shows. I'm going to read > a lot of docs in the coming months, because real people depend on reasonable > performance of our databases. If you need immediate help you can get comm

Re: [GENERAL] License question[VASCL:A1077160A86]

2005-10-05 Thread Jim C. Nasby
out/licence > > It has _got_ to be the easiest piece of legalese you'll ever Not easy enough to avoid confusion though. :) -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.

Re: [GENERAL] Securing Postgres

2005-10-05 Thread Jim C. Nasby
ysical access to a machine can obtain any data on (or moving through) that machine, plain and simple. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf ce

Re: [GENERAL] Trying to append text to the end of a text string

2005-10-05 Thread Jim C. Nasby
7; as text)" > PL/pgSQL function "f_create_index_currency_inversion" line 28 at assignment > > Note I am using PL/pgSQL. > > > Can you help? > > Thanks > Adam > > Adam Lawrence > Mediasculpt > > Direct Line: +64 6 3546038 > Email

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-06 Thread Jim C. Nasby
x27;? If memory serves, both Oracle and DB2 have ways to handle updates on views that are not automatically updateable. What we're missing are *automatically* updateable views. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://perv

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-06 Thread Jim C. Nasby
out why it > wasn't doing ANYTHING when I declared an FK reference at column level. > > Things like that are, sadly, kinda rampant in MySQL. Are you aware of the MySQL Gotchas website (just google it)? Any time you see MySQL being stupid about something you should probably check there

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-06 Thread Jim C. Nasby
at would duplicate the features of a federated system. Of course it would be easier if it was in the back-end... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf

Re: [GENERAL] PostgreSQL Gotchas

2005-10-06 Thread Jim C. Nasby
of setting a bit in the index once a tuple is visible to all running transactions. This would be a win on larger indexes that don't have a lot of insert/update/delete activity. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.co

Re: [GENERAL] PostgreSQL Gotchas

2005-10-06 Thread Jim C. Nasby
ree, this is only a gotcha if you're used to the very non-standard behavior in MySQL. > * Nits so minor as not to be worth addressing (non-optional AS in FROM > clauses vs. SQL standard's making that AS optional there) *shrug* I think it's useful to be able to see why something

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-06 Thread Jim C. Nasby
On Thu, Oct 06, 2005 at 01:46:29PM -0500, Scott Marlowe wrote: > On Thu, 2005-10-06 at 12:23, Jim C. Nasby wrote: > > On Thu, Oct 06, 2005 at 10:10:14AM -0500, Scott Marlowe wrote: > > > But what really bugs me is that some things that ARE bugs simply aren't > > >

Re: [GENERAL] PostgreSQL Gotchas

2005-10-06 Thread Jim C. Nasby
On Thu, Oct 06, 2005 at 02:30:53PM -0400, Alex Turner wrote: > MySQL is to linux, what Jet is to Windows IMHO, oh wait - Jet has foreign > keys by default... MySQL is the WindowsME of databases <- first hit searching for MySQL on CafePress. :) -- Jim C. Nasby, Sr. Engineering C

Re: [GENERAL] Dump all except some tables?

2005-10-06 Thread Jim C. Nasby
in/pgtodo?pg_dump), I find myself wondering if it would be good to allow for specifying a set of rules for what to dump in a file, probably something like a set of regexes with a way to specify if it's an include or exclude rule. Seems like it would be a heck of a lot simpler to do that for c

Re: [GENERAL] PostgreSQL Gotchas

2005-10-06 Thread Jim C. Nasby
On Thu, Oct 06, 2005 at 12:54:43PM -0700, CSN wrote: > - lowercase folding. I DO sometimes wish I could use > fieldID, etc. without quoting it. I believe that may be against ANSI SQL. In any case, the only databases I can think of that don't fold-case in some form are MySQL and Access

[GENERAL] Oracle buys Innobase

2005-10-07 Thread Jim C. Nasby
http://lnk.nu/prnewswire.com/4dv.pl -- 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-569-9461 ---(end of broadcast

Re: [GENERAL] Dump all except some tables?

2005-10-07 Thread Jim C. Nasby
would make it easier to ensure your config file is correct. -- 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-569-9461 -

Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-07 Thread Jim C. Nasby
On Thu, Oct 06, 2005 at 11:42:57PM +0100, Mark Cave-Ayland wrote: > - All the companies that have tried to operate by selling PostgreSQL > support > services have gone bankrupt, except for EnterpriseDB. Damn, guess I need to update my resume... -- Jim C. Nasby, Sr. En

Re: [GENERAL] PostgreSQL Gotchas

2005-10-07 Thread Jim C. Nasby
gets to mark nonvolatile functions > properly. (Personally, though, I'm in favor of tightening it up.) Aren't there a good number of performance issues if you mis-mark a function? In any case, ISTM it'd be much better to perform poorly rather than give bad/wrong results. I do

Re: [GENERAL] PostgreSQL Gotchas

2005-10-07 Thread Jim C. Nasby
HO, anyone messing around with object names that won't fold is asking for trouble anyway. -- 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-5

Re: [GENERAL] SELECT FOR SHARE and FOR UPDATE

2005-10-07 Thread Jim C. Nasby
; select a.f, b.f from a,b for update of a for share of b. > Any hints? > > Thanks. >From http://www.postgresql.org/docs/8.0/interactive/sql-select.html: FOR UPDATE [ OF table_name [, ...] ] I'm assuming that the syntax is the same for FOR SHARE. -- Jim C. Nasby, Sr. Eng

Re: [GENERAL] Dump all except some tables?

2005-10-08 Thread Jim C. Nasby
On Sat, Oct 08, 2005 at 02:22:23PM -0700, David Fetter wrote: > On Fri, Oct 07, 2005 at 08:21:31PM -0500, Jim C. Nasby wrote: > > On Fri, Oct 07, 2005 at 02:07:47AM -0700, David Fetter wrote: > > > On Fri, Oct 07, 2005 at 11:47:26AM +0300, WireSpot wrote: > > > > But

Re: [GENERAL] Oracle buys Innobase

2005-10-08 Thread Jim C. Nasby
ySQL using the GPL'd version of InnoDB... but of course if they did that they'd have GPL'd software again, so no reason to pay for the commercial license of MySQL. This is the first time I can think of where software being GPL'd might actually hurt the open-source community. --

Re: [GENERAL] Oracle buys Innobase

2005-10-09 Thread Jim C. Nasby
On Sun, Oct 09, 2005 at 03:16:22PM +0200, Martijn van Oosterhout wrote: > On Sat, Oct 08, 2005 at 05:01:50PM -0500, Jim C. Nasby wrote: > > Though AFAIK there wouldn't be anything illegal about someone with a > > commercial license of MySQL using the GPL'd version of InnoD

Re: [GENERAL] INSERT OR UPDATE?

2005-10-10 Thread Jim C. Nasby
---- > TIP 3: Have you checked our extensive FAQ? > >http://www.postgresql.org/docs/faq > -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf

  1   2   3   4   5   6   7   >