[GENERAL] generating a parent/child relationship in a trigger

2005-04-12 Thread Mark Harrison
onships parent child -- - /foo/foo/bar /foo/bar/foo/bar/baz /foo/bar/foo/bar/bot Is this a reasonable thing to do in a trigger? Does anybody have a pl/sql snippet to do this? Many TIA, Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)

Re: [GENERAL] Postgres in government

2005-05-19 Thread Mark Harrison
method get involved. As opposed to people with science degrees but poor understanding of business methods? :-) Cheers, Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister comma

Re: [GENERAL] Postgres in government

2005-05-23 Thread Mark Harrison
Scott Marlowe wrote: On Thu, 2005-05-19 at 15:10, Mark Harrison wrote: Sadly, lots of people in positions of power still want scape goats, rather than proven results. No, it could be that the OP's organization is looking for some proof of postgresql's results. That's a bit

[GENERAL] pointers to sql standard, or "most common" sql?

2005-05-23 Thread Mark Harrison
So, I was trying to figure out which was close to standard sql: select * from foo limit 10 or set rowcount 10 select * from foo and couldn't find much relevant information via google. Is the sql standard on the web, and is there some document about the syntax variations between sybase,

[GENERAL] anybody used ERWin with pg?

2005-07-08 Thread Mark Harrison
is such a thing possible? TIA! Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] accessing postgresql via odbc?

2005-08-10 Thread Mark Harrison
So, I've got pg running on a linux box, and I'm informed that a windows box should be able to access this through ODBC, about which I am woefully uninformed. Can somebody loan me a clue as to what I should do to make this happen? Many TIA! Mark -- Mark Harrison Pixar Animati

[GENERAL] implicit index created, do I need to also create an explicit index?

2005-11-18 Thread Mark Harrison
NIQUE will create implicit index "tv_workspace_name_key" for table "tv_workspace" NOTICE: CREATE TABLE / UNIQUE will create implicit index "tv_workspace_p4client_key" for table "tv_workspace" TIA! Mark -- Mark Harrison Pixar Animation Studios

[GENERAL] queueing via database table?

2007-01-02 Thread Mark Harrison
o a SELECT FOR UPDATE where ... limit 1, generate thumbnail, delete the record and commit. Comments and suggestions welcome, Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, plea

[GENERAL] combining two queries?

2004-10-22 Thread Mark Harrison
- x.moray I would like to end up with a query result like this: viewer | count --+ x.surf | 3055 x.dream | 1291 x.moray | 3105 x.sleepy |199 Many TIA! Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast

[GENERAL] size in bytes of a table?

2005-02-11 Thread Mark Harrison
nt of data we have. Thanks! Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] mirroring tables to sqlite?

2005-12-05 Thread Mark Harrison
see how to pull the appropriate schema information from postgresql. The final output will be sqlite statements to create tables which mirror the structure in the master postgresql database. Does anybody have something like this already? Thanks! Mark -- Mark Harrison Pixar Animation Studios ---

[GENERAL] why am I getting a seq scan on this query?

2006-01-06 Thread Mark Harrison
I'm expecting this to do an indexed scan... any clue why it's not? This is with PG 7.4. Thanks!! planb=# explain select id,shotname from df_files where showid=30014515::bigint; QUERY PLAN --- Seq Scan o

[GENERAL] posgresql <-> oracle

2006-04-06 Thread Mark Harrison
Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] query that needs two nested queries, is this the best way?

2006-04-27 Thread Mark Harrison
I've got a query that depends upon two pieces of data from another table for use in a where clause. If I perform this procedurally, I can issue two sql commands (see below), one to get the two pieces of data to search upon (QUERY 1), and one to perform the query with these two pieces of data plu

Re: [GENERAL] query that needs two nested queries, is this the best

2006-04-28 Thread Mark Harrison
Richard Huxton wrote: SELECT id FROM p4_versions WHERE (versionof, version) IN (SELECT id,headver FROM p4_files WHERE ...) Ahh, just what I was looking for... Thanks All! Mark ---(end of broadcast)--- TIP 4: Have you searched our list archives

[GENERAL] createdb feature request

2004-02-11 Thread Mark Harrison
Apache has a nice feature: it creates copies of all the default configuration files, so that it's easy to diff and see what has been modified in the config files. Can this be included in createdb as well? Thanks, Mark Here's a patch: *** initdb.sh-orig 2004-02-11 11:25:49.0 -0800 --- ini

[GENERAL] any sql for doing radix conversion?

2004-03-17 Thread Mark Harrison
I would like to give out the results of select nextval('foo_seq') as a base-36 number. Are there any built-ins to perform this? Many TIA, Mark ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org

[GENERAL] any experience with multithreaded pg apps?

2004-05-07 Thread Mark Harrison
I'm looking for feedback from anybody who has used pg in a multi-threaded program, particularly one in which several threads each open a database connection. It's documented to work in that scenario, but I'm interested in anybody who can share some real-world with that. Many TI

Re: [GENERAL] Listing databases

2004-05-05 Thread Mark Harrison
rom within psql. Whoever thought to add this to psql is a genius!!! HTH... Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmail

[GENERAL] asynchronous query example in C?

2004-05-19 Thread Mark Harrison
Are there any asynchronous query examples online? I'm especially interested in event loop integration. Many TIA! Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unreg

[GENERAL] HOWTO: Integrating Posgresql queries into an event loop

2004-05-27 Thread Mark Harrison
HOWTO: Integrating Posgresql queries into an event loop. Mark Harrison [EMAIL PROTECTED] May 27, 2004 Problem --- The commonly used postgresql APIs will block until completed. If you are in a GUI event loop, this will block your GUI responsiveness until a query is completed. If the queries are

[GENERAL] async problems?

2004-06-01 Thread Mark Harrison
Here is a test program which dies in the postgres runtime. I've simplified the code as much as I can, and I cannot see where I'm doing anything wrong. Has anybody had success with async mode? Am I doing something wrong here? Or are there some problems with async operation that I don't know about?

[GENERAL] constant time count(*) ?

2003-10-15 Thread Mark Harrison
te a lot. Thanks! Mark -- Mark Harrison Pixar Animation Studios ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[GENERAL] maximum number of client connections?

2003-10-16 Thread Mark Harrison
We have the situation where it would be convenient if we could support a large number (>1024, possibly in the 2000-3000 range) of client connections. What are our options for this? Many TIA, Mark -- Mark Harrison Pixar Animation Studios Emeryville, CA ---(end of broadc

[GENERAL] why does explain tell me I'm using a seq scan?

2003-11-07 Thread Mark Harrison
I have indexed two columns in a table. Can somebody explain to me why the first query below uses an Index Scan while the second uses a Seq Scan? Many TIA! Mark planb=# \d abcs Table "public.abcs" Column | Type | Modifiers -

Re: [GENERAL] why does explain tell me I'm using a seq scan?

2003-11-10 Thread Mark Harrison
Adam Ruth wrote: The optimizer is looking at the statistics and figuring that the second query could be done better with a sequential scan (perhaps there aren't many rows). Have you analyzed the table to get the statistics up to date? It could also be that the seq scan is faster with the si

[GENERAL] are cursors necessary?

2003-12-04 Thread Mark Harrison
value in my own query-only programs to declaring the cursor for each search? Many TIA, Mark -- Mark Harrison Pixar Animation Studios ---(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