Re: [GENERAL] Postgresql-fdw

2016-05-23 Thread Rader, David
On Mon, May 23, 2016 at 1:52 AM, aluka raju wrote: I have data storage in flat files (structured and unstructured) . I want to run sql queries on that , so i am looking in to postgresql how to use fdw on the data that i have. You could use the file_fdw to "attach" the files as foreign tables. At

Re: [GENERAL] postmaster deadlock while logging after syslogger exited

2017-11-16 Thread David Pacheco
On Mon, Nov 6, 2017 at 12:35 PM, Tom Lane wrote: > David Pacheco writes: > > I ran into what appears to be a deadlock in the logging subsystem. It > > looks like what happened was that the syslogger process exited because it > > ran out of memory. But before the postm

Re: [GENERAL] CUBE SYNTAX

2007-05-28 Thread David Fetter
cube. <http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/cube/> Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: h

Re: [GENERAL] Transactional DDL

2007-06-04 Thread David Fetter
If there is a word or phrase in the above that you do not understand, please feel free to ask, but blithely continuing to top post will get you a reputation you don't want. Regards, David. > > On 6/2/07, Leif B. Kristensen <[EMAIL PROTECTED]> wrote: > > > >On Saturday

pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-05 Thread David Gardner
This post got me thinking, is there a similar procedure for PL/pgSQL functions? --- David Gardner, IT The Yucaipa Companies (310) 228-2855 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Conway Sent: Friday, June 01, 2007 9:00 PM To: Islam Hegazy Cc

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-05 Thread David Gardner
in is something that needs to run server side? --- David Gardner, IT The Yucaipa Companies (310) 228-2855 -Original Message- From: Dave Page [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 1:38 PM To: Pavel Stehule Cc: David Gardner; pgsql-general@postgresql.org Subject: Re: pl/pgsql deb

Re: pl/pgsql debuging, was Re: [GENERAL] debugging C functions

2007-06-06 Thread David Gardner
- >> From: David Gardner <[EMAIL PROTECTED]> >> To: "'Dave Page'" <[EMAIL PROTECTED]> >> Sent: 06/06/07, 00:14:52 >> Subject: RE: pl/pgsql debuging, was Re: [GENERAL] debugging C functions >> >> I grabbed the May 10th dev sn

Re: [GENERAL] How to count pairs?

2007-06-10 Thread David Fetter
air, count(*) FROM ( SELECT a.word AS word_a, b.word AS word_b FROM foo a JOIN foo b ON ( a.id=b.id AND a.word != b.word AND a.word > b.word ) AS bla GROUP BY pair; Now with duplicates allowed. Note

Re: [GENERAL] Distributing PostGres database to various customers

2007-06-12 Thread David Fetter
mydatabase This is better phrased: psql -f mydadatabase.dump If anything goes wrong, the error will contain the line number where it went wrong. Cheers, D -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666

Re: [GENERAL] PostGreSQL for a small Desktop Application

2007-06-13 Thread David Gardner
I'm not much of a .Net guy, but the pgsql-ODBC driver works rather well for me. Take a look at: http://psqlodbc.projects.postgresql.org/howto-csharp.html As for Windows XP, isn't there some limit to the number of incoming network connections? --- David Gardner, IT The Yucaipa Comp

[GENERAL] Postgres VS Oracle

2007-06-18 Thread David Tokmatchi
, volumes ? Resouces needed ? Support ? Regards cordialement david tokmatchi +33 6 80 89 54 74

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-18 Thread David Wall
hours" certainly is nothing like what we see. David ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Excell

2007-06-19 Thread David Gardner
Agreed ODBC is the way to go, depending on what you are doing, Access may be helpfull as an intermediate step. Joshua D. Drake wrote: Bob Pawley wrote: Hi All Is there a fast and easy method of transferring information between MS Excel and PostgreSQL?? odbc? Joshua D. Drake Bob Pawl

Re: [GENERAL] Excell

2007-06-19 Thread David Gardner
or two tables from Excel and manipulate the information in Postgresql then transfer the results back to Excel as a single table. I am using Excel 2000 and PostgreSql 8.1. Bob - Original Message - From: "David Gardner" <[EMAIL PROTECTED]> To: "Postgresql" Se

[GENERAL] Regular express question

2007-06-22 Thread David Goodenough
into an SQL statement (that is as text or a ? which my code provides) but I can not see how to get the expression from the table. David ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Regular express question

2007-06-22 Thread David Goodenough
On Friday 22 June 2007, David Goodenough wrote: > I have a table that consists of a set of regular expressions, a priority > and a result. I need to be able to match field in another table against > the set of regular expressions (ordered by priority) and use the first > result. >

Re: [GENERAL] regexp searching in arrays not working?

2007-06-22 Thread David Fetter
as patterns, which don't match the data 'Trans'. > > Since there's no "(array) ANY op scalar" syntax, Why isn't there? Is it forbidden by the SQL standard? Cheers, D -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778

[GENERAL] Need help with generic query

2007-06-25 Thread David Abrahams
Background: I have a number of schemas all of which contain a "ticket" table having the same columns. The goal of the function xticket1 below is to collect all ticket rows satisfying some condition from all those schemas, and additionally label each one by adding a new column containing the name o

Re: [GENERAL] OFFSET and LIMIT - performance

2007-06-28 Thread David Wall
of the SQL standard, too, should that matter for DB portability. I believe mysql supports it, but it seems like Oracle didn't (at least at one time). David ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] [pgsql-general] In memory tables/databases

2007-07-01 Thread David Fetter
ant to actually save the data on disk. > So mount a ramdisk and initdb in there. You could also put a tablespace on a ramdisk and create the table there. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666

Re: [GENERAL] Polymorphic delete help needed

2007-07-06 Thread David Fetter
d then piling on heaps of unnecessary code. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgresql.org/about/

Re: [GENERAL] Polymorphic delete help needed

2007-07-06 Thread David Fetter
On Fri, Jul 06, 2007 at 08:39:50AM -0500, Perry Smith wrote: > > On Jul 6, 2007, at 8:01 AM, David Fetter wrote: > > >On Thu, Jul 05, 2007 at 09:56:12PM -0500, Perry Smith wrote: > >>I am doing a project using Ruby On Rails with PostgreSQL as the > >>da

Re: [GENERAL] REQUEST: option to auto-generate new sequences with CREATE TABLE (LIKE)

2007-07-18 Thread David Fetter
> original sequence. That's the right behavior. You should be using pg_get_serial_sequence('your_table','your_column') to get the sequence name anyhow. :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778AIM:

Re: [GENERAL] How do I create a database if I can't connect to it?

2007-07-27 Thread David Fetter
*/ > Now, am I doing something terribly wrong/noobish, or Postgres is freaking > out because I want to create a database that does not exist? It's freaking out because you are not the postgres user it expects when trying to connect with createdb. It expects you to be the postgres user,

Re: [GENERAL] plperl syntax highlighting for vi

2007-07-30 Thread David Fetter
On Mon, Jul 30, 2007 at 07:58:14PM -0500, Decibel! wrote: > On Jul 30, 2007, at 3:44 PM, Geoffrey wrote: > >Has anyone taken a stab at adding plperl syntax highlighting for > >vi? > > Hrm, not likely. David Fetter might be able to point you at > something. > >

Re: [GENERAL] plperl syntax highlighting for vi

2007-07-31 Thread David Fetter
On Tue, Jul 31, 2007 at 01:19:06PM -0400, Bruce Momjian wrote: > David Fetter wrote: > > On Mon, Jul 30, 2007 at 07:58:14PM -0500, Decibel! wrote: > > > On Jul 30, 2007, at 3:44 PM, Geoffrey wrote: > > > >Has anyone taken a stab at adding plperl syntax highlighting f

Re: [GENERAL] pgpool2 vs sequoia

2007-08-03 Thread David Fetter
onous replication, and those who do buy Oracle's RAC (and curse it) or use DB2's offering (and also curse it ;). For most purposes, fast asynchronous replication is good enough. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778

[GENERAL] Crosstab Question

2007-08-08 Thread David Blewett
on to wrap the crosstab_n_cols functions to be able to return a variable number, but that seems hackish. Are there any other alternatives? David Blewett [1] http://www.varlena.com/GeneralBits/110.php [2] http://www.varlena.com/varlena/GeneralBits/Tidbits/QnA/views.sql -BEGIN PGP SIGNATURE---

Re: [GENERAL] language interface in postgresql

2007-08-15 Thread David Fetter
nces. > > Dollar-quoting is a cute technical solution to that, but you can't > deny that it's simpler if you just restrict the function language to > be SQL-ish so that CREATE FUNCTION can parse it without any > interesting quoting rules. So sayeth Oracle

[GENERAL] POSTGRE CRASH AND CURRVAL PROBLEM HELP!

2007-08-19 Thread David Azevedo
Please, i need help desperately. Im running postgresql 8.1.9 on windows 2003 server standard edition service pack 2. intel pentium 4 3.2 - 1 gb ram I have 5 databases in this server and they all have action all day ( inserts, selects etc ) i have 2 problems. First, postgre crashes many times in

Re: [GENERAL] PostgreSQL vs Firebird feature comparison finished

2007-08-23 Thread David Fetter
DB2, etc. and plan a useful way to manage all > that data from the beginning. That's another reason why the Wiki is > a bad way to cope with this data; adding another column is a painful > and error-prone operation. Could be. Try viewsourcewith with your favorite editor and see whethe

Re: [GENERAL] Bigtime scaling of Postgresql (cluster and stuff I suppose)

2007-08-26 Thread David Fetter
g to have to look deeper than that obviously > biased quote. I seem to remember a forum thread with someone having > considerable difficulty with MySQL cluster, and actual MySQL > employees jumping in to try to help and no solution ever found. > Anyone have that link lying around? I th

Re: [GENERAL] Is there a better way to do this?

2007-08-29 Thread David Fetter
CLARE >time ALIAS FOR $1; >days ALIAS FOR $2; > BEGIN >RETURN time+days*24*3600*''1 second''::INTERVAL; > END; > ' LANGUAGE 'plpgsql'; This seems like a lot of extra work. SELECT now() + 5 * INTERVAL '1 day';

Re: [GENERAL] arrays of foreign keys

2007-09-10 Thread David Fetter
TE and DELETE. > Is there a solution to this problem with arrays of foreign keys, and > if so, how does one do that? See above :) Cheers, David. > > Thanks for any help. > > Max > > > ---(end of broadcast)---

Re: [GENERAL] Question about a query with two count fields

2007-09-11 Thread David Fetter
SQL standard <> or IS NOT DISTINCT FROM instead. > sum(case when z =0 then 1 end) as bad > from foobar > where str != 9 This may parse differently, but <> is more cautious. Cheers, David. > group by 1,2,3 > order by 1 > ; > > > > -Original Me

Re: [GENERAL] Question about a query with two count fields

2007-09-11 Thread David Fetter
On Tue, Sep 11, 2007 at 02:28:24PM -0400, Tom Lane wrote: > "George Pavlov" <[EMAIL PROTECTED]> writes: > >> From: David Fetter [mailto:[EMAIL PROTECTED] > >> This case statement returns true when z factorial is zero, so I'd > >> recommend

Re: [GENERAL] importing pgsql schema into visio (for diagramming)

2007-09-12 Thread David Fetter
databases via ODBC and/or .NET. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! Consider donating to PostgreSQL: http://www.postgre

[GENERAL] pg_dump problem: 'pg_dump: schema with OID 1515546 does not exist'

2007-09-24 Thread David Brain
toring the DB isn't _completely_ out of the question, but I'd like to avoid it if at all possible. Thanks, David. David Brain [EMAIL PROTECTED] 919.297.1078 ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] pg_dump problem: 'pg_dump: schema with OID 1515546 does not exist'

2007-09-24 Thread David Brain
may be missing, this table is created in a schema that is often dropped/re- created. David. The select results in one line ( On Sep 24, 2007, at 10:58 AM, Tom Lane wrote: David Brain <[EMAIL PROTECTED]> writes: I am getting the error mentioned in the subject ('pg_dump: sche

Re: [GENERAL] pg_dump problem: 'pg_dump: schema with OID 1515546 does not exist'

2007-09-24 Thread David Brain
working just fine (which it wasn't previously). Again, thanks for the help, it is this kind of access to assistance that makes PG a much easier 'sell'. David. David Brain [EMAIL PROTECTED] 919.297.1078 ---(end of broadcast)

Re: [GENERAL] pg_dumping large objects

2007-09-24 Thread David Wall
Large objects are defined in the DDL as type 'OID'. Those with various drivers may not know the lo_* calls are being used, since in Java this takes place if you use the SQL BLOB type in JDBC and the field itself is defined as 'OID'. David Alvaro Herrera wrote: Morri

[GENERAL] trying to migrate to a new server.

2007-09-24 Thread David Siebert
I have a very old postgres server that I am trying to move the data off of. It is running 7.1 and has been trouble free for 6 plus years. I am trying to move the data base off to a server running 8.1. I have managed to back up the data using PG_Dump using like this. " pg_dump -b -Fc -h stan.somepla

[GENERAL] Porblems migrating a server.

2007-09-25 Thread David Siebert
I have a very old postgres server that I am trying to move the data off of. It is running 7.1 and has been trouble free for 6 plus years. I am trying to move the data base off to a server running 8.1. I have managed to back up the data using PG_Dump using like this. " pg_dump -b -Fc -h stan.somepla

[GENERAL] Yum Repository for Postgres 8.2.5

2007-09-25 Thread David Siebert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am using CentOS 5 and would like to update to 8.2.5. Does anyone know of a repository that carries it? RedHat 5 should work as well. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3-nr1 (Windows XP) Comment: Using GnuPG with Mozilla - http://eni

Re: [GENERAL] Why the ERROR: duplicate key violates unique constraint "master_pkey" is raised? - Is this a Bug?

2007-09-25 Thread David Fetter
), (4), (5); UPDATE foo SET i=foo.i+1 FROM (SELECT i FROM foo ORDER BY i DESC) f WHERE f.i = foo.i; While specific to Postgres, this technique avoids a lot of messing around with boundary conditions :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ phone: +1

[GENERAL] More on migragting the server.

2007-09-26 Thread David Siebert
I set up a test server using the latest 8.2 as suggest by the list and did pg_dump of the old data base. I created a new empty database with the same name an created a user with the same name as was on the old server. I then tried to do a restore using webmin just as a test and got errors. I am see

Re: [GENERAL] Array intersection

2007-10-17 Thread David Fetter
function to do this. You can use an SQL function, which has the advantage of always being available :) It's up to you to ensure that the input arrays have the same type. Cheers, David. CREATE OR REPLACE FUNCTION array_intersect(ANYARRAY, ANYARRAY) RETURNS ANYARRAY LANGUAGE SQL AS

Re: [GENERAL] Array intersection

2007-10-17 Thread David Fetter
On Wed, Oct 17, 2007 at 01:06:35PM -0500, Josh Trutwin wrote: > On Wed, 17 Oct 2007 10:04:21 -0700 > David Fetter <[EMAIL PROTECTED]> wrote: > > > > > CREATE OR REPLACE FUNCTION array_intersect(ANYARRAY, ANYARRAY) > > RETURNS ANYARRAY > > LANGUAGE SQL >

Re: [GENERAL] A few questions

2007-10-29 Thread David Fetter
re in production. > But I am not sure that is most optimal. Is there a general answer > to such a question? See above :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [

Re: [GENERAL] Problems with PostgreSQL DBI-Link / DBD-ODBC

2007-10-29 Thread David Fetter
r from Perl function: error from Perl function: duplicate key > violates unique constraint "dbi_connection_data_source_key" at line 94. > at line 35. > SQL state: XX000 It looks like you're trying to connect the same data_source and user_name twice. Check whether the existing

Re: [GENERAL] Problems with PostgreSQL DBI-Link / DBD-ODBC

2007-10-30 Thread David Fetter
On Tue, Oct 30, 2007 at 01:12:41PM +0100, Pit M. wrote: > Hi David! > > Thanks for the fast reply. So you mean that I might already have > created a connection but am still trying to create the same one > again? Yes. > >>Check whether the existing one works :) > So

Re: [GENERAL] Delete/Update with order by

2007-10-30 Thread David Fetter
On Thu, Oct 25, 2007 at 09:22:02AM -0300, Evandro Andersen wrote: > In Oracle you can use this: > > DELETE FROM A WHERE A1 = 10 ORDER BY A2 > > There is something in the Postgresql ? Yes. DELETE...USING :) http://www.postgresql.org/docs/current/static/sql-delete.html Cheers, D

Re: [GENERAL] Updated .vim file

2007-10-31 Thread David Fetter
lar quotes. The magic appears to be something like: :syn match pgsqlMyMatch /\$\$.\{.}\$\$/ The real regex would look a lot hairier for arbitrary legal dollar quoting constructs, but if you standardize on something like what's below, it should be easier. Cheers, David. CREATE [OR REPLA

Re: [GENERAL] getting list of tables from command line

2007-10-31 Thread David Fetter
) AND table_type = 'BASE TABLE'; EOT Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.po

[GENERAL] Attaching information about users

2007-11-01 Thread David Goodenough
want to be sure that I only have entries for people who are currently users in this DB. I suppose what I want to do is to use foreign key constraints, but that would be to a postgresql specific table (I guess, or is the table that holds the list of IDs and its field names common across DBs?). David

Re: [GENERAL] Problems with PostgreSQL DBI-Link / DBD-ODBC

2007-11-05 Thread David Fetter
On Mon, Nov 05, 2007 at 05:02:03PM +0100, Pit M. wrote: > Hi David, > > I'm sorry to bother you again, but I still couldn't get it to work. > Like you suggested, I checked for successfully installed schemas. > There was one, which I deleted again because I don't know

[GENERAL] Insert statements really slow

2007-11-09 Thread Waller, David
I have an application that I am porting from MySQL to PostgreSQL and I am working on the import Perl script that process the data. The data is web log data and each line has a variable amount of the fields (mostly because of cookies) so I am using a lot of insert statements. In MySQL I go throu

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-10 Thread David Fetter
o shove database-specific attributes in. > > which was my main point. If your ORM is broken as above, either fix it or do something that isn't broken. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Sk

Re: [GENERAL] reverse strpos?

2007-11-12 Thread David Fetter
the environment at all--you could do: CREATE OR REPLACE FUNCTION rev(TEXT) RETURNS TEXT IMMUTABLE LANGUAGE SQL AS $$ SELECT array_to_string( ARRAY( SELECT substr($1,i,1) FROM generate_series(length($1),1,-1) AS i ), '' ); $$; Cheers, David. -- David Fett

Re: [GENERAL] Insert statements really slow

2007-11-14 Thread Waller, David
: Waller, David Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Insert statements really slow On Nov 9, 2007 12:53 PM, Waller, David <[EMAIL PROTECTED]> wrote: > I have an application that I am porting from MySQL to PostgreSQL and I > am working on the import Perl script that proc

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-14 Thread David Fetter
might try pgloader. :) http://pgfoundry.org/projects/pgloader/ Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating

Re: [GENERAL] Primary Key

2007-11-16 Thread David Fetter
gt; create table foo(id serial unique, a text, b text, primary (a,b)); By itself, this insufficiently restricts what's going on in the table. I'd recommend a TRIGGER that disallows updating the synthetic key. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> ht

Re: [GENERAL] GIN: any ordering guarantees for the hits returned?

2007-11-18 Thread David Fetter
een a CLUSTER and the first write operation after it. > If not, are there any other ideas around? Rather than assuming you know where problems will arise, do some profiling and find out where they actually do :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Pho

Re: [GENERAL] loading a funtion script from a file

2007-11-21 Thread David Fetter
wrong with either of these constructs, you don't get the line number where it did, so the following is better: psql -1 -f my.sql This ensures that the entire thing is run in one transaction, and when anything goes wrong, you'll know the line number where it did. Transactional DDL

Re: [GENERAL] Select all fields except one

2007-11-28 Thread David Fetter
nd that you should look over your design for flaws like this and re-do that design. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider

Re: [GENERAL] Select all fields except one

2007-11-28 Thread David Fetter
On Wed, Nov 28, 2007 at 09:47:19AM -0800, Joshua D. Drake wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, 28 Nov 2007 09:37:43 -0800 > David Fetter <[EMAIL PROTECTED]> wrote: > > > On Wed, Nov 28, 2007 at 05:06:45PM +0100, Matt Doughty wrote: &

Re: [GENERAL] PostgresSQL vs. Informix

2007-11-29 Thread David Fetter
QL doesn't. dblink can be used to poke a hole to other > databases though, including non-postgres ones. dblink, a contrib module, is only for Postgres databases. There are several other options including dblink-tds and DBI-Link on pgfoundry which let you connect to other kinds of data

Re: [GENERAL] Porting from FrontBase

2007-11-29 Thread David Fetter
gi-bin/WebObjects/FrontBase>, so you may be able to use DBI-Link <http://pgfoundry.org/projects/dbi-link/>. If you try that approach, let me know how it works out :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Ya

Re: [GENERAL] hibernate + postgresql ?

2007-12-01 Thread David Fetter
ethods"? You > write the each SQL statement or simply skip some Hibernate > facilities? You'll wind up writing each SQL statement anyway, so just start out with that rather than imagining that a piece of software can pick the appropriate level of abstraction and then finding ou

Re: [GENERAL] SQL Query

2007-12-05 Thread David Fetter
x, array_to_string(array_accum(y),':') FROM your_table GROUP BY x; Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to

Re: [GENERAL] comparing rows

2007-12-11 Thread David Fetter
let's assume none are NULLable. SELECT d1.ts AS ts1, d2.ts AS ts2 FROM data d1 JOIN data d2 ON ( (d1.a, d2.b, d2.c) = (d2.a, d2.b, d2.c) AND d1.ts < d2.ts ) Cheers, David. > > I'm uncertain about the performance of this subquery in modern PGs. If &

[GENERAL] Machine spec 64-bit/32 GB RAM

2007-12-21 Thread David Cotter
be used for caching? Many thanks, David

Re: [GENERAL] XML and Routing

2008-01-08 Thread David Fetter
s is probably to port PGRouting to 8.3 and then standardize on 8.3 as a minimum version. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to v

Re: [GENERAL] many to one of many modeling question

2008-01-11 Thread David Fetter
;foo_4' WHEN foo_5_id NOT NULL THEN 'foo_5' END AS "which_foo", COALESCE( foo_1_id, foo_2_id, foo_3_id, foo_4_id, foo_5_id ) AS "id" FROM refs_all_foo; You can then make this VIEW writeable by the us

Re: [GENERAL] Online Oracle to Postgresql data migration

2008-01-15 Thread David Fetter
On Mon, Jan 14, 2008 at 11:42:50AM -0500, Josh Harrison wrote: > Thanks > > On Jan 12, 2008 9:19 AM, David Fetter <[EMAIL PROTECTED]> wrote: > > > On Fri, Jan 11, 2008 at 01:02:01PM -0500, Josh Harrison wrote: > > > Hi > > > We have an Oracle producti

Re: [GENERAL] Stupid question about WAL archiving

2008-01-18 Thread David Wall
eep around. David ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Replication Using Triggers

2008-01-19 Thread David Fetter
t in MySQL is seriously >> broken. > > I am not arguing that it isn't! :-) I am merely trying to implement > something at least as good (or rather, no more broken) for > PostgreSQL with a minimum of effort. In that case, use one of the existing solutions. They're all w

Re: [GENERAL] Postgresql + digital signature

2008-01-23 Thread David Wall
e private key, and our application has no UPDATE/DELETE calls. Good luck, David ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

[GENERAL] Autovacuum and stats_row_level

2008-01-28 Thread David Wall
mands to run faster? Can it replace them entirely, or do we still need to run them from time to time? Can autovacuum be configured to run in a backup server that is in "recovery" mode handling pg_standby WAL file updates? Thanks, David ---(end of broadcast)-

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread David Fetter
ry* long time. Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: [EMAIL PROTECTED] Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate

[GENERAL] Only first statement of two in update-rule is executing?

2008-01-29 Thread David Owen
ith (a, b, c, d) = ('a', '2', some time, NULL). However, the new row isn't inserted; only the previous row is changed. What am I missing? Any pointers? I've read through the docs (I'm on 8.2.6) for rules several times, and nothing seems to

Re: [GENERAL] Only first statement of two in update-rule is executing?

2008-01-29 Thread David Owen
On Tue, 29 Jan 2008, David Owen wrote: On Tue, 29 Jan 2008, David Owen wrote: I discovered that if I change the rule to only do the insert, I still have troubles. The first update to simple2 will insert an row, but a second update will give a duplicate primary key error. Sorry, that

Re: [GENERAL] Only first statement of two in update-rule is executing?

2008-01-29 Thread David Owen
On Tue, 29 Jan 2008, David Owen wrote: CREATE TABLE simple1(a varchar, b varchar, c timestamp DEFAULT now(), d timestamp, PRIMARY KEY(a, c)); CREATE VIEW simple2 AS SELECT a, b FROM simple1 WHERE d IS NULL; INSERT INTO simple1(a, b) VALUES('a', '1'); CREATE RULE simple2

Re: [GENERAL] Postgres won't start after setting ssl=on

2010-10-11 Thread David Fetter
On Sun, Oct 10, 2010 at 12:08:13AM -0700, Mike Christensen wrote: > While I do appreciate the vote of confidence, rest assured you will > never see a post from me that starts with "So I've been hacking the pg > code and..." Actually, we get *plenty* of those. Cheers,

Re: [GENERAL] What was new in 8.4 & 8.3?

2010-10-11 Thread David Fetter
ures in > each version here: http://wiki.postgresql.org/wiki/Version_History > > Haven't updated that yet to include anything but the one big 9.0 > article you were referring to so far. Should we have a 9.1 one? There's already been at least one large, new feature, namely INS

Re: [GENERAL] NoSQL -vs- SQL

2010-10-11 Thread David Boreham
On 10/11/2010 5:46 PM, Carlos Mennens wrote: Just wondering how you guys feel about NoSQL and I just wanted to share the following article... http://www.linuxjournal.com/article/10770 Looking to read your feedback and / or opinions. http://www.xtranormal.com/watch/6995033/ (warning: may not b

Re: [GENERAL] Problem with initdb: creates database which do not exists

2010-10-19 Thread David Fetter
TP user :) We've all been there. Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics Remember to vote! Cons

Re: [GENERAL] NoSQL -vs- SQL

2010-10-19 Thread David Fetter
On Tue, Oct 19, 2010 at 12:36:44PM -0400, Chris Browne wrote: > dp...@pgadmin.org (Dave Page) writes: > > On Tue, Oct 12, 2010 at 2:58 AM, Peter C. Lai wrote: > >> On 2010-10-11 05:57:37PM -0600, David Boreham wrote: > >>>   On 10/11/2010 5:46 PM, Carlos Mennens wro

[GENERAL] Generate a dynamic sequence within a query

2010-10-20 Thread David Kerr
I know I've seen posts on how to do this, but i can't seem to find them. I've got a data set A, B A, C A, D [...] and so on and i'd like to be able to wite a query that would result in 1,A,B 2,A,C 3,A,D [...] PG version is 8.3. Any ideas? Thanks Dave -- Sent via pgsql-general mailing lis

Re: [GENERAL] Generate a dynamic sequence within a query

2010-10-20 Thread David Kerr
On Wed, Oct 20, 2010 at 11:28:18PM +0100, Raymond O'Donnell wrote: - On 20/10/2010 23:22, David Kerr wrote: - >I know I've seen posts on how to do this, but i can't seem to find them. - > - >I've got a data set - > - >A, B - >A, C - >A, D - >[...] - >

Re: [GENERAL] Generate a dynamic sequence within a query

2010-10-20 Thread David Kerr
On Wed, Oct 20, 2010 at 03:47:19PM -0700, DM wrote: - select generate_series(1,(select count(*) from tax)), country from tax; - - you should use braces around the sub select. - - Thanks - Deepak - Ah, great, thanks! Dave - On Wed, Oct 20, 2010 at 3:30 PM, David Kerr wrote: - - > On

Re: [GENERAL] Generate a dynamic sequence within a query

2010-10-20 Thread David Kerr
t 20, 2010 at 3:30 PM, David Kerr wrote: - - > On Wed, Oct 20, 2010 at 11:28:18PM +0100, Raymond O'Donnell wrote: - > - On 20/10/2010 23:22, David Kerr wrote: - > - >I know I've seen posts on how to do this, but i can't seem to find them. - > - > - > - >I&

Re: [GENERAL] Generate a dynamic sequence within a query

2010-10-21 Thread David Kerr
On Wed, Oct 20, 2010 at 10:32:15PM -0400, Josh Kupershmidt wrote: - On Wed, Oct 20, 2010 at 6:22 PM, David Kerr wrote: - > I know I've seen posts on how to do this, but i can't seem to find them. - > - > I've got a data set - > - > A, B - > A, C - > A, D - &

Re: [GENERAL] Generate a dynamic sequence within a query

2010-10-21 Thread David Kerr
On Wed, Oct 20, 2010 at 09:35:11PM -0700, Darren Duncan wrote: - Josh Kupershmidt wrote: - >On Wed, Oct 20, 2010 at 6:22 PM, David Kerr wrote: - >>I know I've seen posts on how to do this, but i can't seem to find them. - >> - >>I've got a data

Re: [GENERAL] what can depend on index

2010-10-26 Thread David Fetter
On Tue, Oct 26, 2010 at 10:13:04AM +0200, Szymon Guz wrote: > Hi, > today I noticed that in the documentation there is DROP INDEX > CASCADE. I've got one question: what is that for? What can depend > on index? A foreign key can, if the index is unique. Cheers, David. -- D

Re: [GENERAL] Should PQconsumeInput/PQisBusy be expensive to use?

2010-10-27 Thread David Wilson
e actually doing a real async test, otherwise the results are fairly useless. -- - David T. Wilson david.t.wil...@gmail.com

[GENERAL] 9.0.1-1 windows install VC++ 2008 redistributalbe warning

2010-10-29 Thread David Balažic
3 buttons: Cancel, Retry and Ignore 1.) It does not say what it wants or why did it appear. 2.) It looks like the "these programs should be closed before I can continue" dialogs, in which case: Why is for example Eclipse needed to close to install a VC++ library? Eclipse is a Java program.

Re: [GENERAL] Linux

2010-11-04 Thread David Boreham
On 11/4/2010 9:00 AM, Michael Gould wrote: What and why should I look at certain distributions? It appears from what I read, Ubanta is a good desktop but not a server. We use CentOS. I don't know of a good reason to look at other distributions for a server today. You may or may not see

[GENERAL] pg_hba LDAP Authentication syntax

2010-11-04 Thread David Kerr
Howdy, I was hoping someone could help me with ye olde ldap authentication syntax. I'm currently using PG 8.3.9 and an upgrade is not an option. Now, that being said, since i'm very new to LDAP i decided to use PG 9 to experiment with since it looks like it has an easier syntax. So what i've g

Re: [GENERAL] pg_hba LDAP Authentication syntax

2010-11-04 Thread David Kerr
On Thu, Nov 04, 2010 at 02:07:29PM -0700, Magnus Hagander wrote: - > - > I'm trying to translate that to the old syntax of: - >     ldap "ldap://w.x.y.z/ou=postgresql,dc=domain,dc=com;" - > - > basically, i don't know how to fit cn=admin and ldapbindpassword into that string. - - The search+bind

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