[GENERAL] question on renaming a foreign key

2006-10-11 Thread Jonathan Vanasco
I made a HUGE mistake, and used 'UK' as the abbreviation for the united kingdom ( the ISO abbv is 'GB' ) I've got a database where 8 tables have an FKEY on a table 'location_country' , using the text 'uk' as the value -- so i've got 9 tables that I need to swap data out on can anyone s

[GENERAL] bad error message

2006-10-12 Thread Jonathan Vanasco
see anything in the changelogs since 8.1.0 saying that it was addressed-- I could have missed that-- but it also might not have been. So... where can i complain that the error message should include the field name I tried to toss the references constraint in ? // Jonathan Vanasco --

Re: [GENERAL] bad error message

2006-10-12 Thread Jonathan Vanasco
On Oct 12, 2006, at 3:44 PM, A. Kretschmer wrote: Can you show us your SQL? The message is clear: you create a new table with a foreign key to an other table that doesn't exist. An example: Yes, I know that part. The error message is bad though, because it doesn't tell me exactly where the

Re: [GENERAL] bad error message

2006-10-12 Thread Jonathan Vanasco
On Oct 12, 2006, at 7:39 PM, Tom Lane wrote: That's not necessarily all that much help, if you've got so many FK constraints in your command that you don't know exactly where to look. I think what you're really wishing for is an error cursor position. 8.2 has the infrastructure for this, eg re

Re: [GENERAL] column refernce question

2006-10-18 Thread Jonathan Hedstrom
7;)) AS column FROM pg_catalog.pg_constraint co LEFT JOIN pg_catalog.pg_class c ON (co.confrelid = c.oid) LEFT JOIN pg_catalog.pg_class c_from ON (co.conrelid = c_from.oid) WHERE c.relname ~ '^foreign_key_table_name_here$'; cheers, Jonathan ---(end of broadcast)

[GENERAL] forcing compression of text field

2006-12-11 Thread Jonathan Ellis
gives about 50% savings), but is there a way to force pg's own compression before I resort to this? -- Jonathan Ellis http://spyced.blogspot.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] A trigger question

2006-12-19 Thread Jonathan Hedstrom
ink OLD gets assigned for inserts. You should use TG_OP to determine whether it is an insert or update calling the trigger. http://www.postgresql.org/docs/8.2/static/plpgsql-trigger.html However, you might simply be better off defining some unique indexes to prevent duplicates. -Jonathan ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] ERROR: invalid memory alloc request size, and others

2007-01-09 Thread Jonathan Hedstrom
efully solve this problem, but at this point I'm not sure what else to include. Any help would be much appreciated. Thanks, Jonathan ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] ERROR: invalid memory alloc request size, and others

2007-01-09 Thread Jonathan Hedstrom
Scott Marlowe wrote: > On Tue, 2007-01-09 at 13:38, Jonathan Hedstrom wrote: > >> We recently upgraded from 8.1.4 to 8.2.0 on Fedora Core 6, and are now >> seeing a few rather ominous-looking messages. >> >> The problem started with this one, during an update invo

Re: [GENERAL] ERROR: invalid memory alloc request size, and others

2007-01-09 Thread Jonathan Hedstrom
=16384, sizeof(sk_buff)=172 Jan 9 13:07:35 ws116 kernel: SKB BUG: Invalid truesize (4012) len=16384, sizeof(sk_buff)=172 (The memory alloc error first occured early in the morning on the 8th). Thanks, Jonathan ---(end of broadcast)--- TIP 9: In version

Re: [GENERAL] ERROR: invalid memory alloc request size, and others

2007-01-09 Thread Jonathan Hedstrom
stock FC6 kernel and rebooted to that. Hopefully this will take care of the issue. I reindexed the tables related to the failing update. Other than that, is there any cleanup work I should do relating to these errors? Thanks for all the quick responses. -Jonathan ---(end

Re: [GENERAL] ERROR: invalid memory alloc request size, and others

2007-01-09 Thread Jonathan Hedstrom
Tom Lane wrote: > Jonathan Hedstrom <[EMAIL PROTECTED]> writes: > >> We are running a xen kernel: 2.6.18-1.2798.fc6xen >> > > When did you start doing that ... any relation to the time when the > problems started? > We started using the xen ker

Re: [GENERAL] remove embedded carriage returns

2007-01-10 Thread Jonathan Hedstrom
[EMAIL PROTECTED] wrote: > "SELECT replace(columname, 'chr(13)','') from tablename" Try using chr(13) without the single quotes: SELECT replace(columname, chr(13),'') from tablename or you could use '\r' to get the character: SELECT re

Re: [GENERAL] ERROR: invalid memory alloc request size, and others

2007-01-11 Thread Jonathan Hedstrom
Jonathan Hedstrom wrote: > We downloaded the most recent stock FC6 kernel and rebooted to that. > Hopefully this will take care of the issue. We've been up and running for 2 days now on the stock kernel, and haven't seen any of these errors. I'm thinking the issue is resol

[GENERAL] aggregate planning with partitions

2007-03-06 Thread Jonathan Ellis
ing each partition separately but I wanted to know if (a) there is a simpler solution I'm missing and (b) if there is a generalizable principle here that can help me avoid problems with the planner in the future. (From my single data point I would guess "avoid aggregates" bu

[GENERAL] planning issue

2007-03-16 Thread Jonathan Vanasco
a__pkey" PRIMARY KEY, btree (id) "table_a__idx__field_1" btree (field_1) "table_a__idx__field_2" btree (field_2) can anyone offer advice to help me use the indexes on this ? // Jonathan Vanasco ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] planning issue

2007-03-16 Thread Jonathan Vanasco
On Mar 16, 2007, at 3:48 PM, Jeff Davis wrote: To clarify a little: No clarifcation needed. Joshua Drake's suggestion made perfect sense and I was able to implement in 2 seconds. works like a charm! ETA 2 weeks -> 30mins Thanks to all. // Jonathan

[GENERAL] how can i show constraint checks in explain ?

2007-03-17 Thread Jonathan Vanasco
I've got a DELETE query that takes ~2 seconds to process The reasoning is simple -- its doing referential checks, to make sure that I'm not deleting a valid fkey , as several tables fkey on that one. The issue i'm running into is obvious: this should not take 2 seconds. anything that f

[GENERAL] sql indexing suggestions needed

2007-03-20 Thread Jonathan Vanasco
i'm going crazy trying to optimize this select. The table has ~25 columns, the select is based on 10. There are approx 5 million records in the table and growing. No matter how I index + analyze this table, including making an index of every related column on the search, pg keeps doing a

Re: [GENERAL] sql indexing suggestions needed

2007-03-20 Thread Jonathan Vanasco
On Mar 20, 2007, at 2:54 PM, Jonathan Vanasco wrote: No matter how I index + analyze this table, including making an index of every related column on the search, pg keeps doing a sequential scan and never includes an index -- which takes ~2minutes to do. I really need to cut this down

Re: [GENERAL] sql indexing suggestions needed

2007-03-20 Thread Jonathan Vanasco
On Mar 20, 2007, at 3:24 PM, Ron Johnson wrote: How many *distinct* values are there in int_c? What percentage of them match "int_c <= 10"? right now there are 14, and 80% match -- but next week that number will be 20 , 60% ... and so on Same questions, but for int_h. same answer If i

[GENERAL] sql indexing suggestions needed

2007-03-21 Thread Jonathan Vanasco
i'm going crazy trying to optimize this select. The table has ~25 columns, the select is based on 10. There are approx 5 million records in the table and growing. No matter how I index + analyze this table, including making an index of every related column on the search, pg keeps doing a

[GENERAL] libpq dependencies

2007-03-26 Thread Jonathan Pool
I have been using PostgreSQL 8.2.3 under Redhat Enterprise Linux AS 4, but when I tried to install the postgresql-plperl RPM I got a sequence of dependency failures, and remedying them got me into an apparently infinite loop of dependencies on libpq.so versions. I had versions 3 and 4 in /usr/lib a

[GENERAL] tweaks for write-intensive dbs ?

2007-03-27 Thread Jonathan Vanasco
7;ve tried turning fsync off, but no luck there. if anyone could suggest some improvement tips, i'd be grateful. the system isn't huge (only ~5M records ) , but its taking a rather long enough time that any extra speed i can come up with would be a huge improvement..

Re: [GENERAL] tweaks for write-intensive dbs ?

2007-03-28 Thread Jonathan Vanasco
th # of segments , didn't affect anything. maybe segment size ? // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [GENERAL] Deleted Flag/Unique Constraint

2007-03-29 Thread Jonathan Hedstrom
declare a unique constraint that only checks Key and Value when Deleted = 0? Yes, something like this: CREATE UNIQUE INDEX index_name ON table_name ( unique_field) WHERE deleted=0; -Jonathan ---(end of broadcast)--- TIP 1: if posting/reading through

[GENERAL] Instalation problem

2007-03-31 Thread Jonathan Barbero
restart computer and I can´t access to directory ( I can´t delet it too ). Do you know how I can fix this problem? I´m on WinXP 32-bit SP2. Regards. Jonathan.

[GENERAL] queries stop using indexes

2007-03-31 Thread Jonathan Vanasco
e is used i ran analyze, no change. i ran vacuum analyze, no change. i dropped the index, and recreated it -- its now used again. this happened 3x already this week. can anyone offer a suggestion? // Jonathan Van

Re: [GENERAL] queries stop using indexes

2007-04-02 Thread Jonathan Vanasco
fine. heavy use on the index just seems to convince the planner to not use it -- and no amount of analyze or vaccum analyze will change that. i'll post some verbose debugging on the queries and analyze the next time the index blows // Jonathan Va

[GENERAL] sql schema advice sought

2007-04-03 Thread Jonathan Vanasco
I'm redoing a sql schema , and looking for some input First I had 2 tables : Table_A id name a b c Table_B id name x y z

Re: [GENERAL] sql schema advice sought

2007-04-03 Thread Jonathan Vanasco
id id_ref_a references tableA id_comment references Comments thats perfect, and simple. the unified table is too dirty :) i've done stuff like that in the past, and was always upset with it. // Jonath

Re: [GENERAL] UPDATE on two large datasets is very slow

2007-04-03 Thread Jonathan Vanasco
On Apr 3, 2007, at 11:44 AM, Scott Marlowe wrote: I can't help but think that the way this application writes data is optimized for MySQL's transactionless table type, where lots of simultaneous input streams writing at the same time to the same table would be death. Can you step back and work

Re: [GENERAL] inserting multiple values in version 8.1.5

2007-04-04 Thread Jonathan Vanasco
TO x (a,b) VALUES ( :id , :name );""" for row in update_loop: $prepared_statement->execute( row['id'] , row['name'] $db->commit // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [GENERAL] Versioning

2007-04-10 Thread Jonathan Vanasco
. the only thing worth mentioning, is that this sort of archive is a PITA to handle unless you enter a record in both tables as record 0. ie, every new insert puts the full data in both tables. its possible to reconstruct information otherwise, but its a headache. // Jonathan Vanasco

[GENERAL] seeking: advice on reordering table

2007-04-11 Thread Jonathan Vanasco
ch means I'd have to redo all the constraints . // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[GENERAL] rename constraints ?

2007-04-17 Thread Jonathan Vanasco
I didn't see anything in the docs. I saw something in the FAQ suggesting this was in a TODO. Any idea when? ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] bug in schema export?

2007-04-17 Thread Jonathan Vanasco
i believe i found a bug psql> create table test_failure ( id integer primary key ); psql> alter table test_failure alter id rename to id_new ; # not relevant, just illustrating the reason how i got to step 2 psql> alter table test_failure_pkey rename to test_failure_id_new_pke

Re: [GENERAL] bug in schema export?

2007-04-17 Thread Jonathan Vanasco
On Apr 17, 2007, at 2:51 PM, Tom Lane wrote: Jonathan Vanasco <[EMAIL PROTECTED]> writes: i believe i found a bug psql> create table test_failure ( id integer primary key ); psql> alter table test_failure alter id rename to id_new ; # not relevant, just illustratin

[GENERAL] making a pg store of 'multiple checkboxes' efficient

2007-04-18 Thread Jonathan Vanasco
sonally lean towards option a or b . anyone have suggestions ? thanks. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [GENERAL] making a pg store of 'multiple checkboxes' efficient

2007-04-18 Thread Jonathan Vanasco
definitely go this route. It was my first thought, but there is almost no documentation out there for this type of storage. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[GENERAL] unique constraint on 2 columns

2007-04-20 Thread Jonathan Vanasco
I need a certain unique constraint in pg that i can't figure out. Given: create table test_a ( id serial , name_1 varchar(32) , name_2 varchar(32) ); I need name_1 and name_2 to both be unique so that: name_1 never appear

Re: [GENERAL] unique constraint on 2 columns

2007-04-20 Thread Jonathan Vanasco
I need to rewrite evertyhing that queries this table - which is both the core table for my application and supposed to be free of any multi-table queries for simple reads. so i'm going to try the trigger route. // J

Re: [GENERAL] unique constraint on 2 columns

2007-04-20 Thread Jonathan Vanasco
On Apr 20, 2007, at 6:13 PM, Jeff Davis wrote: This is more correct structure, and yes, it would involve a join. I know thats the 'more correct' way -- but I can't do the join , which is why I posted about a 2 column unique index. I tested with a join before posting - i have an already larg

[GENERAL] conditional joins and views

2007-04-24 Thread Jonathan Vanasco
in into a view before, so am at a loss on this being a possibility. seeing little documentation on this, i'm thinking its not possible and i'll have to use a function.

Re: [GENERAL] Schema as versioning strategy

2007-04-26 Thread Jonathan Vanasco
On Apr 25, 2007, at 2:05 PM, Richard Huxton wrote: Owen Hartnett wrote: I want to "freeze" a snapshot of the database every year (think of end of year tax records). However, I want this frozen version (and all the previous frozen versions) available to the database user as read-only. My

[GENERAL] Segmentation Fault using PHP code

2004-10-19 Thread Jonathan Villa
I'm trying to add some functionality to an already existing application...this applications works fine, and uses the PHP function pg_pconnect to make a persistent connection to the database. This works very well. My part is to make a new non-persistent connection (or whatever), to a newly created

[GENERAL] Problem with 7.4.1 and complicated queries

2004-10-23 Thread Jonathan Weiss
information if needed. Thanks, Jonathan ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Problem with 7.4.1 and complicated queries

2004-10-23 Thread Jonathan Weiss
information if needed. Thanks, Jonathan ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list

Re: [GENERAL] Problem with 7.4.1 and complicated queries

2004-10-24 Thread Jonathan Weiss
ther need to vacuum more often, increase your fsm > ssettings, (or both) and probably need to schedule regular analyzes. I tried vacuum full and analyze, but the problem still remains. The funny thing is, that working on a fresh dumped version works. Greets, Jonathan ---

Re: [GENERAL] determine sequence name for a serial

2004-10-27 Thread Jonathan Daugherty
pg_class, pg_namespace, pg_attribute WHERE adrelid = pg_class.oid AND pg_class.relnamespace = pg_namespace.oid AND pg_attribute.attnum = pg_attrdef.adnum AND pg_attribute.attrelid = pg_class.oid AND pg_namespace.nspname = $1 AND pg_class.relname = $2 AND

Re: [GENERAL] determine sequence name for a serial

2004-10-27 Thread Jonathan Daugherty
= pg_attribute.attnum AND pg_depend.refobjid = src.oid AND seq.oid = pg_depend.objid AND src.relnamespace = pg_namespace.oid AND pg_attribute.attrelid = src.oid AND pg_namespace.nspname = $1 AND src.relname = $2 AND pg_attribute.attname = $3; ' language sql; -

Re: [GENERAL] determine sequence name for a serial

2004-10-28 Thread Jonathan Daugherty
n the schema.table.column would be nice if you don't want to worry about having to update your table name and sequence name references in code. -- Jonathan Daugherty Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication & Support Services, (503) 667-4564

Re: [GENERAL] Problem with 7.4.1 and complicated queries

2004-11-10 Thread Jonathan Weiss
so it is not the gui or a network timeout. This query worked for over one year, nobody changed something. VACUUM FULL ; ANALYZE; will not change anything. Any hints? Thank you, Jonathan On Sun, 24 Oct 2004 22:00:09 +0200, Jonathan Weiss <[EMAIL PROTECTED]> wrote: > Hi! > > >

[GENERAL] User-defined types

2004-11-17 Thread Jonathan Daugherty
Thanks for your time. I'm running PostgreSQL 7.4.5. -- Jonathan Daugherty Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication & Support Services, (503) 667-4564 ---(end of broadcast)--- TIP 2: you can get off a

Re: [GENERAL] User-defined types

2004-11-17 Thread Jonathan Daugherty
# composite. Ah, I see -- it wasn't obvious to me. # We don't currently support arrays of composite types. (Nor arrays # of domain types, either, IIRC.) Ok, thanks for your time. -- Jonathan Daugherty Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replica

[GENERAL] Bulk data insertion

2004-11-26 Thread Jonathan Daugherty
o put the data into a table with triggers that would do the checks on the data, but it seems inelegant and I'd like to know if there's a better way. Thoughts? Thanks for your time. -- Jonathan Daugherty Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication &am

[GENERAL] Is there a way to view a rewritten query?

2004-12-02 Thread Jonathan Knopp
I'm trying to set up some complex rules and having a hard time figuring out why they won't work. Being able to see the query after all the rules have been applied would be a huge help, but I can't seem to find a way to do this. log_statement only shows the original. debug_print_rewritten works, but

[GENERAL] use pg_catalog for foreign key constraint

2004-12-16 Thread Jonathan Hedstrom
accomplish this? begin:vcard fn:Jonathan Hedstrom n:Hedstrom;Jonathan org:Downtown Emergency Service Center;Information Services email;internet:[EMAIL PROTECTED] title:Data Systems Administrator tel;work:(206) 464-1570 ext. 3014 version:2.1 end:vcard ---(end of broadcast

[GENERAL] Serial Foreign Key

2005-01-06 Thread Jonathan Stafford
om t1_id_serial" the max_value is much larger than 2^32. Does this vary from system to system? Thanks, jonathan ---(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

[GENERAL] postgresql jdbc connect via hostname instead of just ip

2005-12-04 Thread Jonathan Schreiter
atabase all theipsubnet/24 pam Many thanks, Jonathan ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] postgresql jdbc connect via hostname instead of just ip

2005-12-04 Thread Jonathan Schreiter
Thanks for the help - it was a dns resolving issue after all as you described. Jonathan --- Douglas McNaught <[EMAIL PROTECTED]> wrote: > Jonathan Schreiter <[EMAIL PROTECTED]> > writes: > > > The only way I can connect to the database via > JDBC > > see

[GENERAL] copy a postgres dbase to the same machine with different name?

2006-01-10 Thread Jonathan Roby
Hi everyone,   For a project here at work I look after a web app that communicates with a postgresql database. We need to clone/copy the existing database to run app upgrades on the clone database and then use the upgraded database in place of the original.   I've read the pg_dump/pg_restore

Re: [GENERAL] Wish: remove ancient constructs from Postgres

2006-02-27 Thread Jonathan Gardner
> Aren't you afraid of that in the future these people will switch to MySQL because of ability to work in standard way?.. You're joking, right? At least I had a good laugh. ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please s

[GENERAL] consulta SELECT FOR UPDATE

2006-04-19 Thread jonathan ramirez
Saludo.Tengo un problema con una consulta, como puedo insertar o actualizar un conjunto de datos en una tabla. Hice una consulta para comprarar dos tablas y el resultado los inserto en una nueva tabla, esa nueva tabla tengo los datos que se deben de actualizar en otra tabla, ya tengo la consulta qu

[GENERAL] CreateUser error

2006-05-31 Thread jonathan harvey
I am trying to get PostgreSQL 8.1.4 up and running on fedora core 5.  Upon trying to add a user (I had to use the createuser command) I recieved this error:  [EMAIL PROTECTED] postgresql-8.1.4]# createuser postgresShall the new role be a superuser? (y/n) ycreateuser: could not connect to database p

[GENERAL] Dumping database using 8.1 or 7.1

2006-08-03 Thread Jonathan Vallar
. Regards, Jonathan

Re: [GENERAL] Dumping database using 8.1 or 7.1

2006-08-04 Thread Jonathan Vallar
tables. Some lines on the file are empty (a blank record or a corrupt record?). Before the said lines, there was a "\M". What does "\M" stand for?Thanks in advance. Regards,JonathanOn 8/4/06, Jaime Casanova <[EMAIL PROTECTED]> wrote: On 8/3/06, Jonathan Vallar <[EMAIL

Re: [GENERAL] Dumping database using 8.1 or 7.1

2006-08-07 Thread Jonathan Vallar
Thanks sir.   Is it safe to use the Postgres 8.1.4 pg_dump utility to dump data from a postgres 7.1.2 database?   Thanks again :)   Jonathan Valllar  On 8/5/06, Tom Lane <[EMAIL PROTECTED]> wrote: "Jonathan Vallar" <[EMAIL PROTECTED]> writes: > After dumping the databa

Re: [GENERAL] Dumping database using 8.1 or 7.1

2006-08-08 Thread Jonathan Vallar
n "remarks"CONTEXT: COPY si_t2, line 145: Upon checking line 145, there are no weird characters. Upon checking the whole dump file, the db dump still containts Sample data:"jonathan \"" "I manually removed "\" and the new line. The problem still per

[GENERAL] Installation of Postgres 7.1

2006-08-31 Thread Jonathan Chocolate
Hi!I am unable to install postgres 7.1.2 on my Ubuntu Linux Box. I am installing postgres 7.1.2 from source. I stopped at the process of invoking the "make" command. I have a 7.1.2 database with me and plan to replicate it to another box. Pg_dump reports and error while I was dumping. My Linux Box

[GENERAL] Groups, permissions and visibility

2006-09-11 Thread jonathan . lister
Suppose I have two groups of users and want to keep some sensitive information "hidden" from one group as described in the simple example below. When connecting as user 'visitor' via pgAdmin I am surprised that I can easily browse the structure of tables and the code of functions owned by 't

Re: [GENERAL] serverless postgresql

2004-01-15 Thread Jonathan Bartlett
> Do the developers generally oppose the idea of a threaded (but > non-embedded) backend as well? If the backend is thread-safe, then users > can still choose to run multiprocess or multithreaded right? I've been under the impression that the developers were opposed to a threaded server because of

Re: [GENERAL] bytea

2004-05-11 Thread Jonathan Bartlett
> Also, if I wanted to put a *.pdf file in a bytea column, what functions > do I use to escape any characters in it? What programming language are you using? In Perl, you do something like: $sth->bind_param(1, $file_data, DBI::SQL_BINARY); #DBI::SQL_BINARY is deprecated, but it works In php you

Re: [GENERAL] How to move data from 1 database to another?

2004-05-11 Thread Jonathan Bartlett
> Actually, the database db2 has all ready been created, plus the table names > are the same, so I can not use pg_dump and restore. Yes you can, just use pg_dump with the -a flag, and then just use psql with redirection rather than restore. Jon ---(end of broadcast)-

[GENERAL] 7.5 Windows version

2004-06-22 Thread Jonathan Barnhart
Is there any chance I can get a pre-release executable of the Windows native Postgresql so I can start doing some application development? I do not intend to deploy a buggy postgres, but even if it goes boom occasionally it will allow me to build the app so that when everything is finalized I'm mo

[GENERAL] indexing lat lon

2004-06-27 Thread Jonathan Raemdonck
I have the following situation: I'm developing an reverse geocoder, so input is lat/lon coordinate and output is the nearest textual location. I have a database of +- 2 000 000 records that contains lat/lon and full name of the location. These are the steps I take now: 1 'draw' a box around the

[GENERAL] installation problem...

2004-07-29 Thread Jonathan Wynett
Hi: I'm installing postgresql 7.4.3 on Solaris and during ./configure I get the following error: checking types of arguments for accept()... configure: error: could not determine argument types Any ideas? Jon Wynett Senior Java Developer Research Systems, Inc. 303-413-3985 [EMAIL PROTECTED] -

[GENERAL] pg_proc.proacl documentation

2004-08-02 Thread Jonathan Scott
nd of documentation, other than the code itself, would be most welcome. :D Jonathan Scott ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] created databases as other users...

2004-10-11 Thread Jonathan Villa
Is it possible to create a database to be owned by a user that only exists to postgresql or do they have to be shell accounts as well. $ createdb --owner=testcon testdb but the owner ends up being postgres I'm planning to create a different database for each different project I have. I want the

Re: [GENERAL] created databases as other users...

2004-10-11 Thread Jonathan Villa
For some reason, I never tried $psql --username=testcon testdb I'm trying to use phpPGAdmin at the same time...I guess I was having a tough time using both... thanks Tom for the reply. On Mon, 2004-10-11 at 16:01, Tom Lane wrote: > Jonathan Villa <[EMAIL PROTECTED]> writes:

[GENERAL] Converting to Java date example

2004-09-29 Thread Jonathan Villa
Quick question, hopefully... How do you store a date in Postgresql using Java date format, i.e. 2004-00-01 where that would be January 1, 2004 (looking for the 00 as Jan.) I've googled but only found someone else with the same problem. ---(end of broadcast)--

Re: [GENERAL] A creepy story about dates. How to prevent it?

2003-06-19 Thread Jonathan Bartlett
> > The problem is that you can't do the check on the _field_ since it has > > already been converted to a date. > > You're right. How about a "before insert" trigger? This suffers from the same problem, I believe. If I weren't a lazy bastard, I check it :) Jon ---(end

Re: [GENERAL] Alternative replication method.

2003-06-24 Thread Jonathan Bartlett
I haven't used this. It would probably work, but there's also another way just using plain SCSI. You can attach both your main machine and a hot standby to an external RAID array. When the main machine goes down, just mount the RAID array yourself. However, you should also install a serial powe

[GENERAL] Physical Database Configuration

2003-06-24 Thread Jonathan Bartlett
I know the current method for specifying alternate drives for PG tables is by using symlinks. I had some ideas for simple ways to do this in PG code, but wanted to know if anyone was working on this right now. I'd hate to take the time to start messing with this if others were already on it. Jon

Re: [GENERAL] How many fields in a table are too many

2003-06-26 Thread Jonathan Bartlett
> The original developers didn't really have a concept of storing different > info in different tables. That kind of stuff drives me nuts. Where do people get their CS degrees? It took me less that 2 days to teach our ARTISTS how to construct fully-normalized tables (it's a long story as to why I

[GENERAL] Making pg_dump cvs friendly

2003-07-04 Thread Jonathan Bartlett
I have created a patch to postgresql 7.3.3 to make pg_dump more CVS friendly. Basically, pg_dump numbers all of it's TOC entries. Therefore, if you modify or recreate a view that used to be at the beginning, then ALL of your tables/indexes/etc get renumbered, which causes a lot of junk in your CV

Re: [GENERAL] any body using Solaris8 with postgresql 7.3.3

2003-07-04 Thread Jonathan Bartlett
I would add a nohup. In addition, are you using the Solaris performance/process monitoring tools? I forget which one, maybe pfiles, would occasionally send wierd signals to processes. Check your cron listings to see if you're running anything like that. Jon ---(end of

Re: [GENERAL] Is PostgreSQL cluster capable?

2003-07-18 Thread Jonathan Bartlett
Has anyone tried PostgreSQL in a MOSIX-like cluster? Jon On Fri, 18 Jul 2003, [ISO-8859-1] Jordi Sánchez López wrote: > Can two postgresql processes (running in different machines) access and > work with the same database files in a shared storage scenario? Would > there be any problem? > > Than

[GENERAL] Function index qeustion

2003-07-25 Thread Jonathan Bartlett
Questions: 1) If you have an index on a cacheable function, does PostgreSQL use the index instead of calculating the results? 2) How does PostgreSQL know when to recompute the function? Jon On Fri, 25 Jul 2003, Elielson Fontanezi wrote: > Thanks a lot! > > The complete solution is here! > > 1s

Re: [GENERAL] CREATE TABLE with REFERENCE

2003-07-28 Thread Jonathan Bartlett
Why not just drop the "references" clause? I mean, the point of having transactions is to guarantee integrity within a transaction, if you're not going to have that, why even bother with the clause? Most of my databases don't even user "references", just because I like the flexibility, and I have

Re: [GENERAL] CREATE TABLE with REFERENCE

2003-07-29 Thread Jonathan Bartlett
> So, how can you possibly tell when looking at your note which entry it > applies to? That's easy - these are always referred from the table, never to the table. In the few instances where I go the other way, it's limited to 2 or 3 tables, and I do separate joins combined with a UNION. > When y

Re: [GENERAL] CREATE TABLE with REFERENCE

2003-07-29 Thread Jonathan Bartlett
NOTE - after writing all this, I did think of a possible solution, but I'm not sure if PG can handle it. If I made a table called "object" with one column, the object_id, and then had EVERY table inherit from this table. Then, I could have my constraints set up against this master table. (I'm not

Re: [GENERAL] CREATE TABLE with REFERENCE

2003-07-29 Thread Jonathan Bartlett
> Your programmers must be really smart :-) > Are you saying that you have never seen a person writing a piece of sql > like: > insert into mytable (id, data) select max(id) + 1 from mytable, 'mydata' > ??? > > If so, you must be really lucky :-) > I would never hire such a person. > Exactly. But

Re: [GENERAL] CREATE TABLE with REFERENCE

2003-07-29 Thread Jonathan Bartlett
> Not *one* table. I never advocated that. It is perfectly normal to split > your data into different tables *vertically* (i.e. things that do not > have any intersection between their data, should go into different > tables), but it very rarely (if at all) makes any sense to split it > *horizontal

Re: [GENERAL] Updating from update trigger

2003-07-31 Thread Jonathan Mezach
Is there anyone who has a solution to this problem? Greetings, Jonathan Mezach aka Taz News Writer for HL2Zone (www.hl2zone.net) -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Jonathan Mezach Verzonden: vrijdag 25 juli 2003 21:07 Aan: [EMAIL PROTECTED

Re: [GENERAL] One table into two different databases

2003-08-14 Thread Jonathan Gardner
the database Y. > > I try to find it in Postgres docs, with no success. > Trying running in one database with multiple schemas. - -- Jonathan Gardner <[EMAIL PROTECTED]> Live Free, Use Linux! -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/N/QIWgwF3QvpWN

Re: [GENERAL] XML?

2003-08-14 Thread Jonathan Bartlett
What would be really cool (although a lot harder to implement) would be the ability to generate a hierarchical XML document when using foreign key relationships. Trying to tell PG how to format that might be a bit of an issue, though. Jon On Thu, 7 Aug 2003, Gavin M. Roy wrote: > Add an > ech

Re: [GENERAL] Hour difference?

2003-08-18 Thread Jonathan Bartlett
Is there a way to get an interval in a standard format? It seems like it keeps changing it's ouput style based on the time length. Jon On Mon, 18 Aug 2003, Bruno Wolff III wrote: > On Mon, Aug 18, 2003 at 16:09:43 +0200, > Bjørn T Johansen <[EMAIL PROTECTED]> wrote: > > I need to compute the

Re: [GENERAL] Linux ready for high-volume databases?

2003-08-26 Thread Jonathan Bartlett
> Online backups with archived transaction logs are the next big killer feature > (the last one remaining?) for 24x7 operation I think. I believe this is at least theoretically possible using Linux device layer tricks. Using network block devices, you can have a network RAID1, with the transactio

Re: [GENERAL] PostgreSQL and HA?

2003-08-28 Thread Jonathan Bartlett
You can do HA from the OS level: Have a SCSI disk array shared between two computers Use a journalling filesystem on this array Have a "serial kill switch" Have a program that checks if each server is alive. If the primary goes down, the secondary will: a) Shut off the power to the primary b) Mo

<    1   2   3   4   >