Re: [GENERAL] [pgeu-general] Replication failover

2013-05-23 Thread TJ
not using WAL archiving only streaming. And server4 is behind server3. So would we need to setup WAL archiving to achieve this? - TJ On 22/05/13 23:22, Heikki Linnakangas wrote: On 22.05.2013 10:23, TJ wrote: I am looking to migrate my databases from one set of hardware to another all the

[GENERAL] Speed up Switchover

2013-07-25 Thread TJ
.2,FreeBSD 9.1, Streaming replication and WAL log archiving. Thanks TJ

Re: [GENERAL] simple remote user access question - pg_hda.conf

2003-10-14 Thread tj
I just discovered that SuSE provides the sample pg_hba.conf in /usr/share/pgsql but the real pg_hba.conf file is located in /var/lib/pgsql/data Fixed! ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if

[GENERAL] duplicates rejected by index reports PGSQL_FATAL_ERROR

2003-10-31 Thread tj
isting then perform the insert" takes 25 minutes. Is there a better way? -- TJ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

[GENERAL] a provocative question?

2007-09-06 Thread TJ O'Donnell
r than databases, in that should disk corruption occur, most of the mail is likely to be unaffected, and any that is damaged can usually be recovered." How naive (optimistic?) is it to think that "the database" can replace "the filesystem"? TJ O'Donnell http://www.g

Re: [GENERAL] Function to convert from TEXT to BYTEA?

2007-12-12 Thread TJ O'Donnell
I think decode('your string', 'escape') might be what you need. It returns bytea when 'your string' is type text or varchar. TJ http://www.gnova.com Is there a function that will do what I want to convert the datatype without having to create a CAST that PostgreS

[GENERAL] plpython returns integer[] fails for multi-dimensional array

2010-12-21 Thread TJ O'Donnell
imensional arrays in plpython? TJ O'Donnell -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] plpython returns integer[] fails for multi-dimensional array

2010-12-21 Thread TJ O'Donnell
a fn that returns integer[] AND I can't return a two-dimensional array. Not a happy 9.0 camper. Anyone know of any plans to 9.0 plpython to support multi-dimensional arrays? TJ O'Donnell On Tue, Dec 21, 2010 at 4:02 PM, Adrian Klaver wrote: > On Tuesday 21 December 2010 3:25:48

Re: [GENERAL] PostgreSQL Array Use

2008-03-03 Thread TJ O'Donnell
I use arrays of integers, double or numeric, and text. They are 1 or 2 dimensional. They are usually limited to <100 elements in one dimension and <10 in the other. TJ O'Donnell http://www.gnova.com ---(end of broadcast)--- TIP 1:

[GENERAL] cool code_swarm animation of PostgreSQL development since 1996

2008-06-16 Thread TJ O'Donnell
This is a very cool animation for your amusement, amazement and edification. http://www.vimeo.com/1081680 TJ O'Donnell http://www.gnova.com/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/

[GENERAL] array_agg problem

2011-08-19 Thread TJ O'Donnell
(val) from x; select array_agg(val) from x; Well, everything works except the last statement. In 8.4 I get ERROR: could not find array type for data type integer[] I was hoping for [1,2,3,4,5] or at least [1,2,3,3,4,5] or even [[1,2,3],[3,4,5]] Am I not understanding something? Thanks, TJ O'Do

Re: [GENERAL] [pgsql-sql] Daily digest v1.3328 (5 messages)

2010-09-22 Thread TJ O'Donnell
or even 1 and 0? Of course I can do this for an individual query using appropriate functions, but it would help me to be able to modify the default behavior. TJ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] [pgsql-sql] Daily digest v1.3328 (5 messages)

2010-09-23 Thread TJ O'Donnell
json_encode. I'm all set now. Thanks for the help! TJ O'Donnell On Thu, Sep 23, 2010 at 1:18 AM, Raymond O'Donnell wrote: > On 23/09/2010 02:00, Adrian Klaver wrote: >> >> On Wednesday 22 September 2010 5:40:55 pm David Wilson wrote: >>> >>> On W

Re: [GENERAL] options for launching sql script asynchronously from web app

2008-11-08 Thread TJ O'Donnell
should use https, and not hard-code passwords...all the usual security precautions. Anything ready? Hard to say without knowing more about your specific needs. TJ O'Donnell http://www.gnova.com I'd like to launch some sql script asynchronously from a web app and have some kind of feed

Re: [GENERAL] Lost password

2008-12-16 Thread TJ O'Donnell
It seems you haven't done anything you need to save, so why not save time and just reinstall postgres? TJ Hi  I started the installation of postrgres got distracted and then started again but forgot my password -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

[GENERAL] bit varying(512) vs bytea(64)

2005-03-21 Thread TJ O'Donnell
can I pass bit varying data to a c-language function? I can't find any docs or examples of that. 3) are bit strings stored as actual bits or as character strings of 0 and 1? Thanks, TJ ---(end of broadcast)--- TIP 2: you can get off all lists at

[GENERAL] varbit functions

2005-04-02 Thread TJ O'Donnell
d write the others, but I want to ask if functions like these already exist (and I just can't find them)? Does anyone have any ideas about how to use combinations of existing functions (shifts, ands, etc.) to do these functions? The bit strings I am interested in r

[GENERAL] user privilege to create c function

2005-07-12 Thread TJ O'Donnell
to grant. The user owns the database, by the way, but still can't create the function. The user only needs to create C functions for her own database(s). TJ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] [SQL] dynamically loaded functions

2005-07-13 Thread TJ O'Donnell
get an error from postmaster that my.so cannot be loaded because function x cannot be found. If I reverse their.a their2.a in the link command, all is well. Note: I never use, nor even knew about the exitence of function x() - "they" do. Any help on how to make this more pain-free? TJ M

[GENERAL] dynamic loading of c-functions

2005-07-21 Thread TJ O'Donnell
oes a dynamically loaded .so get unloaded? I want to avoid preloading .so's at server startup, but also avoid dynamically loading them for ~every~ session. TJ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] user's groups

2005-08-02 Thread TJ O'Donnell
I know of the four user's group listed at http://pugs.postgresql.org/ I'm interested in starting one in the San Diego area. If there are others in San Diego who are interested, please get in touch with me. Thanks, TJ O'Donnell [EMAIL PROTECTED] ---(e

[GENERAL] best way to reference tables

2005-08-09 Thread TJ O'Donnell
use that would disallow inserting a name into the master table unless another table by that name already exists? And what could ensure that a table would not be renamed or dropped unless the master table is changed? TJ ---(end of broadcast)--- TIP 5

Re: [GENERAL] best way to reference tables

2005-08-09 Thread TJ O'Donnell
> TJ O'Donnell wrote: >> I have many different tables that I want to keep track of. >> So, I thought of a master table with those table names in it. >> But, to maintain this (suppose a table changes >> its name, gets dropped) I want to have some kind of referentia

Re: [GENERAL] best way to reference tables

2005-08-10 Thread TJ O'Donnell
7;s an idea. That is a great idea! And you examples were very helpful. I think this will get me what I need. Thanks, TJ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] append to the current search_path

2005-08-12 Thread TJ O'Donnell
/usr/local/bin where I can get the current value and just append to it. TJ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your messa

[GENERAL] do separate databases have any impact each other?

2005-08-15 Thread TJ O'Donnell
other databases/sessions? When a session ends that had opened my database, do all traces of it disappear, except its life on disk? How about .so's it might have caused to be loaded? TJ ---(end of broadcast)--- TIP 3: Have you check

Re: [GENERAL] do separate databases have any impact each other?

2005-08-16 Thread TJ O'Donnell
Alvaro Herrera wrote: On Mon, Aug 15, 2005 at 01:15:03PM -0700, TJ O'Donnell wrote: While writing installation instructions for my new PostgreSQL product, I found myself writing the following sentence: "For first time users, we recommend building the gnova database, since it has

[GENERAL] c-language function .h file changes between (major) versions

2005-09-26 Thread TJ O'Donnell
hange? minor? I suppose the wise thing is to recompile with ANY pg version change. Thanks, TJ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] problem with bit(n) type

2005-10-12 Thread TJ O'Donnell
i in the text range, one could say there is a text equivalent, but in general not. I think you're looking for some kind of printf-type %b function? Maybe someone has written one, or maybe you'll have to do so. If you do, how about a hex representation of bit(n) - I could use th

[GENERAL] dynamic loading of .so

2005-10-14 Thread TJ O'Donnell
use dynamic loading of my .so, each session is independent, with its own static variables. Will the same be true if I were to load the .so once when the database starts up? Or will there be just one set of static variables for all sessions? TJ ---(end of broadcast

[GENERAL] dynamic loading of .so

2005-10-14 Thread TJ O'Donnell
same be true if I were to load the .so once when the database starts up? Or will there be just one set of static variables for all sessions? TJ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [GENERAL] new type question

2005-10-17 Thread TJ O'Donnell
will be faster)? Declare x real; Begin x = cast($1 as real); Return x; Exception When OTHERS Then Return NULL; End; Thanks, TJ On a side note, do you really want to punt to 0 when an invalid value comes it? That sounds like something MySQL would do... ISTM you should throw an error.

Re: [GENERAL] resetting superuser password

2005-11-09 Thread TJ O'Donnell
I would unix su, edit pg_hba.conf to allow open access temporarily, connect to pg and change the posgres password. Don't forget to change pg_hba.conf back again to password protect the db! TJ I have lost the superuser (user postgres) password, but I still have the unix root password. Is

[GENERAL] using new bitmap scans to index bit columns?

2005-11-09 Thread TJ O'Donnell
data. bitmask is precomputed/stored as bit(1024) = fingerprint(datacolumn) contains(a,b) returns bool as 'select b=(a&b);' This works well because matches() is an expensive functions. But it would work better if bitmask could be indexed, no? TJ O'Donnell

Re: [GENERAL] R and postgres

2006-11-07 Thread TJ O'Donnell
s back into a R dataframe. There is a nice way to dump a dataframe back into a table which is created for you, with columns and datatypes as appropriate. Hope this helps. TJ O'Donnell http://www.gnova.com/ I'd like to get R to talk to postgresql, but my head's spinning among a web of

Re: [GENERAL] Functions on tables

2006-12-16 Thread TJ O'Donnell
reason. I can also have tables that are sub-classes of the original table. TJ http://www.gnova.com/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] need simple strategy for universal extension table

2004-11-13 Thread TJ Talluto
particular table, it would contain regular keys that point back to whatever table::record is its source. I was thinking of using two keys only: xmOwnerInfo COL1 PK* oidParentTable COL2 PK* oidParentTablesRecord COL3-15 [attribs] Thoughts? -- TJ Talluto torpedo51 at yahoo dot com

Re: [GENERAL] need simple strategy for universal extension table

2004-11-13 Thread TJ Talluto
Since nobody has mentioned any nuances about mapping these keys to system tables in this particular database, I'll assume this is a good idea for now. -- TJ Talluto torpedo51 at yahoo dot com ---(end of broadcast)--- TIP 4: Don't &#x

[GENERAL] how to optimize my c-extension functions

2005-01-08 Thread TJ O'Donnell
ese details from the user - meaning they would not have to create/update these additional columns? Thanks, TJ O'Donnell ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] how to optimize my c-extension functions

2005-01-09 Thread TJ O'Donnell
table related to the table containing the smiles - and all behind the scenes so the sql user is unaware of this. My thought was that an index is like that and I might borrow some of the internal uses of indexing for my purposes. TJ O'Donnell [EMAIL PROTECTED] Pierre-Frédéric Caillaud wrote:

Re: [GENERAL] how to optimize my c-extension functions

2005-01-09 Thread TJ O'Donnell
ion. It is analogous to regexp matching, except that the semantics of oe_matches is nothing at all like string matching, even though smiles is actually a character string. Character string smiles are simply an extenral representation of a more complex c++ molecular structure object. TJ Pierre-Fré

Re: [GENERAL] how to optimize my c-extension functions

2005-01-09 Thread TJ O'Donnell
>,LIKE?) to do the matching. A c-function is simply called with data and would have no access to indexes, correct? TJ Pierre-Frédéric Caillaud wrote: Well, first and easy thing you can do is create a column to store the parsed representation and update it via a trigger when the original, un

Re: [GENERAL] how to optimize my c-extension functions

2005-01-10 Thread TJ O'Donnell
and require the user to pass me the parsed_smiles column for quick searches. And the user could maintain the parsed_smiles in a separate table, if he so desired, with foreign key relations. Thanks to everyone for all your advice. This is my first postgresql project and I'm liking what I've

[GENERAL] visualizing B-tree index coverage

2005-01-25 Thread TJ O'Donnell
-column index. In other words, do my multi-columns sufficiently but not overly discriminate rows from each other? Do I have too many with the same index? (not enough branches) Do I have a unique index for each row? (way too many branches) Thanks, TJ ---(end of broadcast)-

Re: [GENERAL] visualizing B-tree index coverage

2005-01-25 Thread TJ O'Donnell
timal situation where there is not one index for all rows and also not a unique index for every row - something inbetween would be ideal, or is that basically a wrong idea? TJ > Useful explanation of PostgreSQL index format: > http://www.faqs.org/docs/ppbook/c13329.htm > > I think y

Re: [GENERAL] visualizing B-tree index coverage

2005-01-27 Thread TJ O'Donnell
ciently, even when it is a perfectly ordinary row with no ONE feature being distinctive, but rather several features together giving it it's distinctive character. That is my interpretation of the multi-column index. TJ PFC wrote: I think you missed an important "feature" of multicolu

[GENERAL] Does indexing help >= as well as = for integer columns?

2005-02-01 Thread TJ O'Donnell
actual time=8050.437..42117.062 rows=1569 loops=1) Filter: (_c >= 30) Total runtime: 42133.746 ms TJ ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Does indexing help >= as well as = for integer columns?

2005-02-02 Thread TJ O'Donnell
the histograms that Analyze creates?" Are they available anywhere? The docs mention them (bins) and I was hoping Analyze Verbose would show them to me. TJ Tom Lane wrote: "TJ O'Donnell" <[EMAIL PROTECTED]> writes: This I don't get. Why is an index scan not used? Isn&#

[GENERAL] does the planner "learn"?

2005-02-07 Thread TJ O'Donnell
stand why my searches are speeding up so I can make it happen the first time, if possible? Thanks, TJ Try #1: Select distinct smiles from structure where (_c, _o, _arom_c, _c_double, _o_double, _n, _ring_c, _ring_hetero, _halogen, _n_double, _arom_n, _s, _s_double, _other_atoms, _c_triple, _n_tripl

[GENERAL] Oracle DB Worm Code Published

2006-01-07 Thread TJ O'Donnell
ny default user/password? Is this an issue we should be concerned about, at some level? TJ O'Donnell ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Converting Text to Bytea

2006-02-01 Thread TJ O'Donnell
decode(your_string,'escape') will convert text to bytea You can just use this as a sort of type cast, or: 1. Create a new bytea column in your table 2. Update the table, setting the newcolumn = decode(oldcolumn,'escape') 3. Drop the oldcolumn (or not) TJ Date: Wed, 01 Feb

Re: [GENERAL] I see this as the end of BDB in MySQL without a doubt.

2006-02-15 Thread TJ O'Donnell
any purchases were intended simply to confuse people about the future of MySQL and therefore ecourage them to select Oracle? TJ O'Donnell http://www.gnova.com/ ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] Five reasons why you should never use PostgreSQL -- ever

2006-03-15 Thread TJ O'Donnell
Slashdot had this today. http://searchopensource.techtarget.com/originalContent/0,289142,sid39_gci1172668,00.html TJ O'Donnell www.gnova.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desi

[GENERAL] efficiency of group by 1 order by 1

2006-03-17 Thread TJ O'Donnell
my func is rather expensive. Is func(x) evaluated three times in the above statement? Would it be evaluated only once if I used select func(x)group by 1 order by 1 TJ O'Donnell www.gnova.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] postgres vs. oracle for very large tables

2006-05-15 Thread TJ O'Donnell
erformance diminishes with large tables (we’ll be going to upwards of hundreds of millions of rows)." Is this pure speculation, opinion, known fact? Does anyone know of measured performance of postgres vs. oracle, specifically with very large tables? TJ O'Donnell www.gnova.com --

[GENERAL] recompliing c-language functions with new releases of postgres

2006-05-24 Thread TJ O'Donnell
7.4.8 or even 7.4.12? Can I assume that header file changes only occur between major pg changes, such as 7.3 to 7.4, or 8.0 to 8.1? TJ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] recompliing c-language functions with new releases of postgres

2006-05-24 Thread TJ O'Donnell
"TJ O'Donnell" <[EMAIL PROTECTED]> writes: Presumably, the only reason I would HAVE TO recompile is when some header file changes. Is there any guarantee that header files DO NOT change, for example from 7.4.5 to 7.4.8 or even 7.4.12? Can I assume that header fi

[GENERAL] aggregate of bitstrings

2006-06-22 Thread TJ O'Donnell
and my orsum without INITCOND returned the proper OR of the remaining values when including all rows in the aggregate. it did not return null. maybe the aggregator (whoever,whatever that is) handles null args differently, not calling the func when the arg is null? pg8.1.3 TJ Florian G. Pf

Re: [GENERAL] Changing encoding of a database

2006-06-23 Thread TJ O'Donnell
o utf8. I did the following: pg_dump -p 5433 --encoding ISO_8859_7 -t cas tj |psql tj where the dump connected to 7.4 (port 5433) and interpreted the cas data using ISO_8859_7. psql connected to 8.1 I had to experiment to find that ISO_8859_7 was the "proper" encoding - i had some g

Re: [GENERAL] index vs. seq scan choice?

2007-06-08 Thread Patrick TJ McPhee
hing more in favor of % index scans. Also, increasing effective_cache_size. (And increasing statistics...) -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to c

Re: [GENERAL] Move a database from one server to other

2007-06-29 Thread Patrick TJ McPhee
you don't even have to shut down the db. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] growing disk usage problem: alternative solution?

2007-06-29 Thread Patrick TJ McPhee
only) need to rebuild the affected indices. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Ordering by a complex field

2007-07-21 Thread Patrick TJ McPhee
andard order by clause (that is, without writing a new SQL function)? You can use a case statement in the order by clause order by case when field = '0' then 4 when field = '1' then 1 when field = '2' then 0 when field

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-07-31 Thread Patrick TJ McPhee
t casts to work, the type's OID has to be listed in that function (i.e., it has to be a built-in type). -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an

Re: [GENERAL] Porting MySQL data types to PostgreSQL

2007-08-04 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Tom Lane <[EMAIL PROTECTED]> wrote: % [EMAIL PROTECTED] (Patrick TJ McPhee) writes: % > One problem with this idea is the treatment of implicit casts between % > numeric types in TypeCategory(). For implicit casts to work, the type's % > OI

Re: [GENERAL] memory optimization

2007-08-17 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Sabin Coanda <[EMAIL PROTECTED]> wrote: [...] % So, what is better from the postgres memory point of view: to use temporary % objects, or to use common variables ? Temp tables can cause serious bloat in some of the system catalog tables. -- Patri

Re: [GENERAL] Selecting K random rows - efficiently!

2007-10-29 Thread Patrick TJ McPhee
w, there's no way to construct a random ctid in a stock postgres database, but apart from that it seems like a good plan. If efficiency is important, you could create a C function which returns a series of random tids and join on that. -- Patrick TJ McPhee North York

Re: [GENERAL] Determining current block size?

2007-12-12 Thread Patrick TJ McPhee
you try to start the database with a postmaster compiled with the wrong block size, the error message tells you what block size you need. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched

Re: [GENERAL] timestamp with time zone

2007-12-14 Thread Patrick TJ McPhee
he closest you can get is to store the tz in a different column % and use AT TIMEZONE (which accepts a column name as argument) % Or use date + time with time zone. This could cause problems if you want to insert a timestamp for a date with different DST settings. It also seems a lot more cumbersom

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-09 Thread Patrick TJ McPhee
the ones where the columns aren't all nulls. You look up 90 rows in attribute_value, then 90 rows in attribute, then 90 rows in value. You're probably looking at 3-6 pages of index data, and then somewhere between 3 and 270 pages of data from the database, for one logical row of data. --

Re: [GENERAL] Postgresql Page Layout details

2008-03-06 Thread Patrick TJ McPhee
ck size to the filesystem block size, particularly if the filesystem blocks are larger than 8k. It's not exactly a lot of trouble to set it up, assuming you compile the database yourself anyway, and it allows the database to do a better job of I/O management. -- Patrick TJ McPhee North Yor

Re: [GENERAL] Unloading a table consistently

2008-05-04 Thread Patrick TJ McPhee
7;; DROP TABLE log_old; COMMIT; I believe this will keep the writers writing while keeping the efficiency of truncating. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Importing undelimited files (Flat Files or Fixed-Length records)

2008-06-23 Thread Patrick TJ McPhee
rt these files to % INSERT-type SQL to run them through psql.. Is there a way one can % specify a table structure with raw field widths and then just pass it a % flat file? pg_loader is supposed to handle this. http://pgfoundry.org/projects/pgloader -- Patrick TJ McPhee North York Canada

Re: [GENERAL] PostgreSQL vs FreeBSD 7.0 as regular user

2008-07-28 Thread Patrick TJ McPhee
sn't required any more (i.e., the same command works with or without the -w flag). I'm not sure the docs should change, since -w is still required at least on NetBSD. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@po

Re: [GENERAL] psql variables

2005-03-26 Thread Patrick TJ McPhee
posix shell). Note that there are no spaces around the equals signs. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Recovering real disk space

2005-04-10 Thread Patrick TJ McPhee
you're clearing out all the data for a set of tables, drop them and recreate them. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] What means Postgres?

2005-04-20 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Daniel Schuchardt <[EMAIL PROTECTED]> wrote: % but there it is only clear that Postgres is based in Ingres. But i also % don't know what Ingres means. Ingres was a Spanish painter. Not every name has to mean something. -- Patrick TJ McPhee N

Re: [GENERAL] Optimising Union Query.

2005-04-24 Thread Patrick TJ McPhee
rom locations where id in (select distinct location from pa union select distinct location from andu union select distinct location from idu); this query might be helped by an index on location in each of those three tables, but probably not. -- Patrick TJ McPhe

Re: [GENERAL] PRIMARY KEY on a *group* of columns imply that each column is NOT

2005-04-27 Thread Patrick TJ McPhee
('alpha'); INSERT 194226 1 $ INSERT INTO x VALUES ('alpha'); INSERT 194227 1 -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Determining when a row was inserted

2005-06-05 Thread Patrick TJ McPhee
d. Typically, someone wants to know when a particular field held a particular value, and you need an audit table for that. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] How to create unique constraint on NULL columns

2005-07-17 Thread Patrick TJ McPhee
x27;t you want to have an entry in the department table with NULL for the department ID? I mean, why should NULL act like NULL wrt foreign keys, but not wrt unique constraints? -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)

Re: [GENERAL] PSQL suggested enhancement

2005-10-21 Thread Patrick TJ McPhee
be easily transformed to the XML you really want. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Can a function determine whether a primary key constraint exists on a table?

2006-10-13 Thread Patrick TJ McPhee
as constraintname % from pg_constraint c join pg_class t on (c.conrelid = t.oid); or, perhaps simpler, select * from information_schema.table_constraints where constraint_type = 'PRIMARY KEY'; -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED]

Re: [GENERAL] Restore database from files (not dump files)?

2006-12-08 Thread Patrick TJ McPhee
child dirs etc, what I assume are it's parts) to % what amounts to the same location: % % c:\postgresql\data\base\16404 As several people have pointed out, this will not work. You can copy c:\postgresql\data and everything under it, but you can't copy individual subdirectories

Re: [GENERAL] Any form of connection-level "session variable" ?

2007-01-05 Thread Patrick TJ McPhee
; You can perform per-user initialisation with alter user set session.myid = 23; Which allows the value to persist between sessions. I haven't done anything with this idea so I can't say how well it works or whether there are downsides to it. -- Patrick TJ McPhe

Re: [GENERAL] OT: Canadian Tax Database

2007-03-09 Thread Patrick TJ McPhee
peless databases in the first stage of that sort of application. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Lifecycle of PostgreSQL releases

2007-03-26 Thread Patrick TJ McPhee
27;t want to introduce them into a stable environment. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Check the existance of temporary table

2007-03-26 Thread Patrick TJ McPhee
ace.oid and pmcphee-# nspname like 'pg_temp%'; pg_table_is_visible - f (1 row) If I go on to create the temp table in the current session, this returns pg_table_is_visible - f t (2 rows) so you need to be ready for more than one row

[GENERAL] Re: The rule question before, request official documentation on the problem

2007-04-12 Thread Patrick TJ McPhee
e DO ALSO rules involving OLD didn't do so well here. The section on rules v. triggers could do with a caveat or two, but it's a bit much to call them "fundamentally dangerous". -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of bro

Re: [GENERAL] can't start tsearch2 in 8.2.4

2007-04-22 Thread Patrick TJ McPhee
ow if there is a fix available? % > % > Thanks % % I have seen discussion about adding PG_MODULE_MAGIC to .c or .h code. % Does anyone have suggestion about where I should add this to tsearch2 % code, and how should I rebuild tsearch2 with this? Probably the easiest thing is to use the tsear

Re: [GENERAL] Moving Tablespaces

2006-01-05 Thread Patrick TJ McPhee
e postgres server with table files from a different postgres server. If you need to do something like that, the answer is to use replication to move the data over as it changes. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)

Re: [GENERAL] Plans for 8.2?

2006-01-13 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Harry Jackson <[EMAIL PROTECTED]> wrote: % I am not aware of Oracle etc having a seperate company that sells % replication on top of their database although I could be wrong. There's more than one third-party replication offering for Oracle. --

Re: [GENERAL] Temporary table visibility

2006-01-26 Thread Patrick TJ McPhee
manent table)? If there's data in the table, you could "select tableoid from session_data limit 1", then check the namespace corresponding to that table. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)-

Re: [GENERAL] PSQL Data Type: text vs. varchar(n)

2006-04-04 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Jim Nasby <[EMAIL PROTECTED]> wrote: % Not sure if it's still true, but DB2 used to limit varchar to 255. I % don't think anyone limits it lower than that. Sybase: 254. Silently truncates. -- Patrick TJ McPhee North York C

Re: [GENERAL] primary keys

2006-04-21 Thread Patrick TJ McPhee
lename ; No arrays are hurt by this query. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Clustered table order is not preserved on insert

2006-04-27 Thread Patrick TJ McPhee
he order in which they're stored on disk. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] psql \echo strangeness with :variables

2006-05-25 Thread Patrick TJ McPhee
below variables need to be space-delimited in \ contexts. Work-around: \set tn 'foo_' :date \echo :tn create table :tn(); -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/rea

Re: [GENERAL] are there static variables in pgsql?

2006-06-12 Thread Patrick TJ McPhee
I'm not sure a static variable is the right way to achieve this, but you could use a custom_variable_class for this. Add this to your postgresql.conf: custom_variable_classes='global' Then you can set and show variables prefixed by global.: set global.success = 'true'

Re: [GENERAL] Performance Question

2006-06-16 Thread Patrick TJ McPhee
the question: Is it just as % fast to do it this way, or is there some hidden advantage to performing an % update? If you have foreign key relationships to the table being updated, then deleting from that table will often be slower than updating. -- Patrick TJ McPhee North York Canada [EMA

Re: [GENERAL] Physical block structure in PostgreSQL

2006-07-14 Thread Patrick TJ McPhee
structure of an item for an index page might be different, though. I found there was enough information in the section you cite to write a simple data dumping tool in an emergency a while ago. -- Patrick TJ McPhee North York Canada [EMAIL PROTECTED] ---(end of broadcas

  1   2   >