Re: [GENERAL] Query optimisation

2008-04-06 Thread Craig Ringer
uot;imagesize" and use an appropriate WHERE clause when looking up the table? -- Craig Ringer -- 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] Query optimisation

2008-04-06 Thread Craig Ringer
Naz Gassiep wrote: > As you can see, they all are the same table, just repeatedly joined with > aliases. Sorry, I'm obviously blind. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [GENERAL] Determining weather a query fired a trigger

2008-04-08 Thread Craig Ringer
ivity was caused by a given query. Does this stuff get logged? If you can modify the trigger and it's written in PL/PgSQL you can use a `RAISE NOTICE' statement to log some information when the trigger fires. Those are several big "if"s though. -- Craig Ringer -- Sent

Re: [GENERAL] Quoting table/column names vs performance

2008-04-09 Thread Craig Ringer
hat means that you need to double quote them. There's nothing special about TableName vs tablename vs TABLENAME, at least as far as I know. You can double quote all identifiers and I think many automated query building tools do just that. It's just a pain to type. -- Craig Ringer

Re: [GENERAL] connecting VB to postgreSQL

2008-04-09 Thread Craig Ringer
search suggests that "server" is ... the server hostname or IP address, and location is the database name. -- Craig Ringer -- 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] connecting VB to postgreSQL

2008-04-09 Thread Craig Ringer
didn't work and I don't know why". The PostgreSQL OLE DB provider README explains how to get more detailed error information. -- Craig Ringer -- 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] Way to shutdown/freeze/stop an individual database without taking postmaster down?

2008-04-10 Thread Craig Ringer
load' can re-read some settings without a postmaster restart. So you might be able to disallow access in pg_hba then reload. I'd be curious to know if that works and if/how it affects existing connections - though I can always test it myself. -- Craig Ringer -- Sent via pgs

Re: [GENERAL] begin transaction locks out other connections

2008-04-11 Thread Craig Ringer
it in any context where you're modifying the data involved. It just seems a lot simpler to think about the effects of deferred foreign key constraints. -- Craig Ringer -- 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] Postgres on shared network drive

2008-04-11 Thread Craig Ringer
machines or is there something else I need to be aware of? No, as far a I know it'll break horribly and eat all your data. -- Craig Ringer -- 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] PostgresSQL on a networked drive with multiple users

2008-04-11 Thread Craig Ringer
J Ottery wrote: Thanks Craig for making me look like an idiot. I feel bad now. That wasn't my intent, so I'm sorry for making you feel bad about it. I was just trying to stress the importance of only ever having one pg instance using a data directory. If you're used to shared

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Craig Ringer
J Ottery wrote: Thanks so much Craig. I have decided to migrate to Postgres and most of my applications are single computer based but I need to plan for future needs. Some research is in order for me. All you should need to do is allow the user / administrator to configure the connection

Re: [GENERAL] Postgres on shared network drive

2008-04-11 Thread Craig Ringer
ve its own I/O system, CPUs and RAM . With some trickyness you could even forward queries that did require writes to the master server transparently, while servicing read only queries locally. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Problem. createdb: could not connect to database postgres: could not connect to server: No such file or directory

2008-04-11 Thread Craig Ringer
t because it cannot read the data in the data directory; it is for the wrong version of postgresql. -- Craig Ringer -- 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] SQL injection, php and queueing multiple statement

2008-04-12 Thread Craig Ringer
instance for it to achieve what you want without developer action, and a global option like that would potentially break 3rd party application code. The alternative would be something like an executeSingle(...) call or a flag to execute ... but that again just comes back to proper code review to

Re: [GENERAL] SQL injection, php and queueing multiple statement

2008-04-13 Thread Craig Ringer
Ivan Sergio Borgonovo wrote: On Sun, 13 Apr 2008 10:03:48 +0800 Craig Ringer <[EMAIL PROTECTED]> wrote: Your wrapper code can potentially do things like scan a string for semicolons not enclosed in single or double quotes. The rule probably has to be a little more complex than tha

Re: [GENERAL] COPY to STDOUT and pipes

2008-04-14 Thread Craig Ringer
dt from sl_cust ) to STDOUT with delimiter '|' \echo '\\\.' then you might be able to use a command line like: psql -f file1.sql | psql -h newhost (note that the second psql is reading the first one's stdout as its stdin). -- Craig Ringer -- Sent via pgsql-general mail

[GENERAL] precompilers

2008-04-15 Thread Ferry, Craig
We are evaluating open source databases for use within our organization. Can anyone tell me if postgresql have a precompiler for Micro focus Cobol for Unix V 4.1 revision 040? Is there a list of these someplace? I poked around on the postgres site. Thanks Craig

Re: [GENERAL] Installation of contrib/tablefunc - problems

2008-04-15 Thread Craig Ringer
ts to be built from a particular location within the postgresql source tree, probably contrib/tablefunc, and you're building it somewhere else. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [GENERAL] util/int8.h: missing int8_text() function

2008-04-15 Thread Craig Ringer
ext() now? Probably an explicit cast, such as CAST(::int8 AS text) CAST('' AS int8) etc. I don't know, but I'd guess that this is related to the removal of all the implicit casts to text from 8.3 . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] How to recovery data from folder data installation?

2008-04-15 Thread Craig Ringer
were using 8.1.4 you should get the latest PostgreSQL in the 8.1 series (NOT 8.2 or 8.3) to try to read the data. Make a copy first. -- Craig Ringer -- 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] Installation of contrib/tablefunc - problems

2008-04-15 Thread Craig Ringer
a try to append tablefunc to that list and rebuild the port. It's been ages since I've used MacPorts (I don't have a mac, so I only use it occasionally on a work box) so I can't give you detailed instructions on how to do that. Here's the current portfile: http://trac.macp

Re: [GENERAL] "vacuum" and "cluster"

2008-04-16 Thread Craig Ringer
t stated explicitly, but I'm pretty sure discussion here has mentioned that too. Given that, VACUUM FULL on a just-CLUSTERed table should be redundant. The easy way to be sure is to use ANALYZE VERBOSE to examine the dead row counts etc before and after each operation. -- Craig Ringer -- Sent

Re: [GENERAL] table as log (multiple writers and readers)

2008-04-16 Thread Craig Ringer
hink it's even OK in the case of a single-statement INSERT (where the transaction is implicit) and/or with the use of clock_timestamp() ... though I'm less sure about that. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] table as log (multiple writers and readers)

2008-04-16 Thread Craig Ringer
the transaction later aborted. It'd also be eye-bleedingly horrible, to the point where even the "send a message from a C function" approach would be nicer. -- Craig Ringer -- 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] table as log (multiple writers and readers)

2008-04-16 Thread Craig Ringer
cess of committing. What you want is a timestamp that's generated at commit time with a guarantee that no later commits will have equal or lower timestamps . As far as I know (I'm *VERY* far from the authority here) there's no way to achieve that, so you have to serialize yo

Re: [GENERAL] Binary bytea to literal strings

2008-04-16 Thread Craig Ringer
d make sense to be able to CREATE TYPE to get a named composite type with the same operator behavior as is implicit in ROW(...) comparisons. What's trivial with a row constructor requires the writing of an operator class and a bunch of comparison functions to do with a named composite type. -

Re: [GENERAL] table as log (multiple writers and readers)

2008-04-16 Thread Craig Ringer
Andrew Sullivan wrote: > On Thu, Apr 17, 2008 at 12:35:33AM +0800, Craig Ringer wrote: >> That's subject to the same issues, because a transaction's >> current_timestamp() is determined at transaction start. > > But clock_timestamp() (and its ancestors in Postgres

Re: [GENERAL] Upgrade 8.3

2008-04-18 Thread Craig Ringer
ng an explicit cast, like CAST(spantreeport AS text) OR CAST(spantreeport AS integer) . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Initial ugly reverse-translator

2008-04-19 Thread Craig Ringer
slow and (b) very sensitive to formatting and other variation. I haven't spent any time on that bit yet, but if anybody has any ideas I'd be glad to hear them. Anyway, the initial version of the script can be found at: http://www.postnewspapers.com.au/~craig/poread.py Consider running

Re: [GENERAL] SQL error

2008-04-19 Thread Craig Ringer
http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING However, the EXCEPTION blocks you use to trap errors aren't free in performance terms, so you should probably look for other approaches first. -- Craig Ringer -- Sent via pgsql-general mailing l

Re: [GENERAL] SQL error

2008-04-19 Thread Craig Ringer
give you a way to find out if an error occurred and get some information about the error. Maybe if you explained your end goal and why you're trying to do this it might help people give you more useful answers? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] Initial ugly reverse-translator

2008-04-19 Thread Craig Ringer
ince whitespace is frequently mangled in copy-and-paste. Perhaps strip all spaces from both strings before matching? Yep, that sounds pretty reasonable. As usual I'm making things more complicated than they need to be. I suspect it'll be necessary to strip quotes and some other punc

Re: [GENERAL] Initial ugly reverse-translator

2008-04-19 Thread Craig Ringer
t (and where browser bugs are the rule rather than the exception) but it's thankfully not necessary to cater to every weird and broken browser. So in this case I don't think encodings will be *too* much trouble unless alternate unicode normalization forms turn out to be more common

Re: [GENERAL] Changed Hosts, Lots of Errors in PostgreSQL - Help Please!

2008-04-20 Thread Craig Ringer
ed procedure. If you want more help I suggest posting the actual SQL statements that are causing problems. If possible get them from the server logs after enabling statement logging, or from the pg interface in PHP if it has any statement logging features. -- Craig Ringer -- Sent via pgsql-

Re: [GENERAL] Changed Hosts, Lots of Errors in PostgreSQL - Help Please!

2008-04-20 Thread Craig Ringer
Craig Ringer wrote: BLazeD wrote: [quote]PHP Warning: pg_query(): Query failed: ERROR: operator does not exist: timestamp without time zone > time without time zone That's really odd. I can't imagine why the timestamp > timestamp operator might be absent. Hmm I mana

[GENERAL] Too many LWLocks taken in query using pg_tgrm & GIN index

2008-04-20 Thread Craig Ringer
sage b (cost=0.00..0.93 rows=8 width=51) Index Cond: (a.message % b.message) Filter: (a.message % b.message) (6 rows) This isn't an issue for me, but I thought I should post it in case it does indicate a bug lurking somewhere, like some kind of lock leak in the tgrm gin index c

Re: [GENERAL] help with "plpgsql"

2008-04-21 Thread Craig Ringer
Pau Marc Munoz Torres wrote: ERROR: language "plpgsql" already exists anybody knows what's wrong? Is there any chance you might be connecting to a different database with the perl script and with psql? Procedural languages must be installed into a particular database.

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-22 Thread Craig Ringer
ER that's suitable if you're not removing anything from the enum ALTER TABLE testtab ALTER COLUMN a TYPE et2 USING ( a::text::et2 ); Personally, though, I'd stick to the good 'ol lookup table and foreign key. -- Craig Ringer -- 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] Postgresql Help

2008-04-23 Thread Craig Ringer
install PostgreSQL as part of a package for a Linux distro it will configure a database for you. You should stop, start, and restart PostgreSQL through the init scripts the distro provides for you in /etc/init.d/ , not using pg_ctl . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] tsearch2 problem

2008-04-23 Thread Craig Ringer
ntrib package does not match the core PostgreSQL version or is from a different source? -- Craig Ringer -- 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] initdb in 8.3

2008-04-23 Thread Craig Ringer
omments form again. When I re-entered my comment and submitted I got an error indicating that '' is not a valid NUMERIC. Going back to the original comments form on the pattern matching operator doc page (having logged in) and submitting there works fine. -- Craig Ringer -- Sen

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-28 Thread Craig Ringer
or changes they could've told you about six weeks ago if they felt like it. So ... it's well worth considering the long term now. Unfortunately I speak from recent experience - and my beginner perl+MySQL code was NOT designed for long term flexibility and robustness. *shudder*.

Re: [GENERAL] Quoting "

2008-04-30 Thread Craig Ringer
e ' and \. But I see that \" isn't documented in the manual in section 4.1.2.1. I assume this is, in fact, standard behavior for Postgres? (Perhaps a comprehensive table might be a good idea at this point in the manual.) craig=# SELECT E'\z\v\k\-'; ?column? -

Re: [GENERAL] How to modify ENUM datatypes?

2008-04-30 Thread Craig Ringer
Robert Treat wrote: If one were to have built something on postgresql 5 years ago, they would have had to do it on 7.3. Whenever anyone posts a problem on 7.3, the first thing people do now days is jump up and down waving thier arms about while exclaiming how quickly they should upgrade. [s

Re: [GENERAL] clustering without locking

2008-05-02 Thread Craig Ringer
r the place? Wouldn't new / updated tuples just get put in the hole, fairly rapidly un-clustering the table again? I guess you could also have a fillfactor to pad out the newly clustered data and just accept huge disk space use. When you ran the lockless cluster again it could als

Re: [GENERAL] clustering without locking

2008-05-02 Thread Craig Ringer
can see the old versions to complete repeat So ... is this crazy? Concurrently clustering the table by moving each record *twice*, in batches, with pauses to allow old versions to cease being visible by any live transaction? Or can it actually work? -- Craig Ringer -- Sent via pgsql-general ma

Re: [GENERAL] clustering without locking

2008-05-02 Thread Craig Ringer
Tom Lane wrote: Craig Ringer <[EMAIL PROTECTED]> writes: So ... is this crazy? Concurrently clustering the table by moving each record *twice*, in batches, with pauses to allow old versions to cease being visible by any live transaction? Or can it actually work? It seems to me you&#x

Re: [GENERAL] clustering without locking

2008-05-03 Thread Craig Ringer
Tom Lane wrote: Craig Ringer <[EMAIL PROTECTED]> writes: Later on, though, less new space would have to be allocated because more and more of the space allocated earlier to hold moved tuples would be being freed up in useful chunks that could be reused. I don't see how that wor

Re: [GENERAL] Executing dynamic procedure call

2008-05-03 Thread Craig Ringer
tekwiz wrote: Result: DBD::Pg:st execute failed: ERROR: operator does not exist: money <> integer HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. CONTEXT: SQL statement "SELECT (( $1 - $2 - $3 - $4 - $%) <> 0)" cra

Re: [GENERAL] large query by offset and limt

2008-05-03 Thread Craig Ringer
Is there a better way to do this? Consider using database cursors. Set up by beginning a transaction and issuing the statement: DECLARE huge_table_curs CURSOR FOR SELECT * FROM huge_table WHERE userid = 100; ... then to get results, just execute: FETCH 1000 FROM huge_table_curs; -- Craig R

Re: [GENERAL] clustering without locking

2008-05-03 Thread Craig Ringer
clustering operation in the first place. Thanks again for taking the time to go over that - it's extremely helpful and much appreciated. -- Craig Ringer -- 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] large query by offset and limt

2008-05-03 Thread Craig Ringer
Ge Cong wrote: Thank you very much. Could you show me how to do it in JDBC? Here's one example. As I haven't been using JDBC directly it's probably horrible, but it'll do the job. Any exception will terminate this example, but in practice you'd want to catch and handle exceptions appropriate

Re: [GENERAL] Unloading a table consistently

2008-05-04 Thread Craig Ringer
_copy' could be a new temp table created with CREATE TEMPORARY TABLE ... LIKE. This sort of thing doesn't seem to come up all that much, though. -- Craig Ringer -- 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] Custom C function - is palloc broken?

2008-05-04 Thread Craig Ringer
more to it than just avoiding freeing memory in a different DLL than it was allocated in. File descriptors, for example, need similar treatment, as do all sorts of other weird little corners that aren't worth enumerating. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-g

Re: [GENERAL] Custom C function - is palloc broken?

2008-05-04 Thread Craig Ringer
brary issues. -- Craig Ringer -- 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] Custom C function - is palloc broken?

2008-05-04 Thread Craig Ringer
Dan "Heron" Myers wrote: Craig Ringer wrote: > Can you send me a complete, compileable example that illustrates the > problem, along with instructions on how to reproduce it? If possible, > send a compiled binary and any dependencies too. I'm curious to see if

Re: [GENERAL] Custom C function - is palloc broken?

2008-05-04 Thread Craig Ringer
to work way too soon... -- Craig Ringer -- 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] Custom C function - is palloc broken?

2008-05-05 Thread Craig Ringer
tion __declspec(dllimport) then defined it). Anyway, the C function examples need some changes to work correctly on win32. I've attached updated versions. These redefine the PG_MODULE_MAGIC and PG_FUNCTION_INFO_V1 macros, but if you omit that code the module will still built, just with

Re: [GENERAL] Custom C function - is palloc broken?

2008-05-05 Thread Craig Ringer
Dan "Heron" Myers wrote: Craig Ringer wrote: I've tested this definition and it produces a DLL that links correctly and does so without the warnings of inconsistent DLL linkage produced by the original versions (which declared the function __declspec(dllimport) then defined

Re: [GENERAL] Custom C function - is palloc broken?

2008-05-05 Thread Craig Ringer
Dan "Heron" Myers wrote: Craig Ringer wrote: I'm actually using a dummy header (just an empty file) for libintl.h . None of the involved module code actually uses anything from libintl, neither directly nor via any inlines/macros from postgresql's headers. I'm not e

Re: [GENERAL] Custom C function - is palloc broken?

2008-05-05 Thread Craig Ringer
Tom Lane wrote: Craig Ringer <[EMAIL PROTECTED]> writes: The other thing I had to do was add include guards on pg_config_os.h to protect against repeat inclusion. VC++ 8.0 does not like the repeated definition of `struct timezone' and `struct itimerval' (but 9.0 - correctly -

Re: [GENERAL] Pl/;perl

2008-05-07 Thread Craig Ringer
George R. C. Silva wrote: > i have activeperl 5.1 installed and pgsql 8.3 You'll need ActivePerl 5.8 . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1

2008-05-09 Thread Craig Vosburgh
led the statement_timeout and set it to five minutes and it does timeout the hung update and return to normal processing by rolling back the offending transaction but that's not a viable solution for us. Anyone have any words of wisdom on how to track this down? Thanks, -Craig -- Sent via pgs

Re: [GENERAL] Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1

2008-05-12 Thread Craig Vosburgh
>> Craig Vosburgh writes: >> We've dumped the locks and it shows that all locks have been granted so >> it appears that it is not a lock that is standing in our way. We've >> also gone in via psql while the update is hung and were able to perform >> an upd

Re: [GENERAL] Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1

2008-05-12 Thread Craig Vosburgh
offending row? The row in the lock table that shows granted false does not show as belonging to a database or relation (both null) so I can't join through to get the table info from pg_table. Thanks for all the help, -Craig On 5/12/08 12:16 PM, "Tom Lane" <[EMAIL PROTECTED]

Re: [GENERAL] rounding problems

2008-05-12 Thread Craig Ringer
lues never approaches the floating point precision limit of the double type. I'm far from sure about that, though, and it'd be handy to hear from people who're doing it. Personally I like to stick to numeric/decimal types. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] changing the endianness of a database

2008-05-12 Thread Craig Ringer
pplications to do pre-migration and post-migration tasks, so you could just dump then initdb and reload. -- Craig Ringer -- 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] rounding problems

2008-05-12 Thread Craig Ringer
Justin wrote: Craig Ringer wrote: `double' in C++ refers to double precision floating point. `double' is subject to all the usual fun with rational decimals being irrational binary floats (and vice versa). Not according to MS specific if i'm reading it correctly *Mic

Re: [GENERAL] rounding problems

2008-05-12 Thread Craig Ringer
(this is a C++/IEEE "double") and see how the results differ. -- Craig Riniger -- 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] Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1

2008-05-12 Thread Craig Vosburgh
o=$7, name=$8, description=$9 where bmo_id=$10 | t | 2008-05-11 17:25:04.484224-06 | 2008-05-11 17:25:04.528319-06 | 2008-05-11 17:02:00.016083-06 | 127.0.0.1 | 49056 Everything else in the table is either IDLE or IDLE in transaction. Thanks again, -Craig On 5/12/08 1:11 PM, "T

Re: [GENERAL] rounding problems

2008-05-12 Thread Craig Ringer
= $83.3462 . Sense GL tables are 2 decimal the value is stored > as $83.35 Thinking about correct rounding and precision is very important, and far from crazy. > The question quickly becomes what number is the correct number. Sometimes the answer is "both of them" - even though they

Re: [GENERAL] Hung SQL Update Linux Redhat 4U5 Postgres 8.3.1

2008-05-15 Thread Craig Vosburgh
>>Craig Vosburgh writes: >> We've dumped the locks and it shows that all locks have been granted so >> it appears that it is not a lock that is standing in our way. We've >> also gone in via psql while the update is hung and were able to perform >> an upd

Re: [GENERAL] Password safe web application with postgre

2008-05-15 Thread Craig Ringer
ting workstation from many of the networks I use day to day. -- Craig Ringer -- 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] DB Locks

2008-05-15 Thread Craig Ringer
big batch updates, though, so I've never had cause to personally confirm this - I can only make a suggestion based on the documentation. Writing a test script or two might be a good idea just to be really confident that you understand it all and that it works how you expect. -- Craig Ring

Re: [GENERAL] Need for help!

2008-05-15 Thread Craig Ringer
r various threads, how their thread priorities were set up, etc. Some apps benefit, some lose. -- Craig Ringer -- 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] Setting up phppgadmin under https/ssl (Apache)

2008-05-17 Thread Craig Ringer
bled. Note that if you want your SSL and non-SSL servers to provide exactly the same content you should use an include file to pull in most of the body of the directive in each file. You might want to direct further questions to somewhere like: http://www.linuxquestions.org/ -- Craig Ringer

Re: [GENERAL] writing a function without installing a language

2008-05-17 Thread Craig Ringer
ight be able to use an SQL function (though I don't really see how you'd handle the special case for "and" without a subquery to obtain a total result count) or write a C extension to do it. Using PL/PgSQL is certainly the easy way. -- Craig Ringer -- Sent via pgsql-gene

Re: [GENERAL] migration problem

2008-05-17 Thread Craig Ringer
ausing a problem, you can perhaps discover something useful. If you track it down to a particular query that the function is generating, and you can't figure out what's wrong by looking at the query, you can try running it with EXPLAIN in psql. -- Craig Ringer -- Sent via pgsql-

Re: [GENERAL] how to return parts of records from a function

2008-05-17 Thread Craig Ringer
f your `IF rec.action' you might able to rewrite the whole thing as single SQL statement (using CASE instead of IF) and wrap it up in an SQL stored procedure. Otherwise RETURN QUERY won't do you much good, because you need to step through the results of the query and do something with the

Re: [GENERAL] writing a function without installing a language

2008-05-17 Thread Craig Ringer
Craig Ringer wrote: ${spencer} wrote: is there a way to write a function without installing a specific language? all i need to do is write a function that can take 3 text's and put them into a list format (eg. "text1, text2 and text3" ) Failing that, you might be able to use

Re: [GENERAL] Postgresql service stops every few minutes on Vista Biz

2008-05-18 Thread Craig Ringer
.conf and changing log_min_messages from: #log_min_messages = notice to log_min_messages = debug1 Also, check to see if all postgresql processes are terminating or whether it's just the master. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

Re: [GENERAL] updating a row referenced by a foreign key

2008-05-18 Thread Craig Ringer
l.org/docs/current/static/ddl-constraints.html#DDL-CONSTRAINTS-FK "Analogous to ON DELETE there is also ON UPDATE which is invoked when a referenced column is changed (updated). The possible actions are the same." -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] tsearch2 on-demand dictionary loading & using functions in tsearch2

2008-05-18 Thread Craig Ringer
x27;t say I've personally noticed the cost of loading tsearch2 dictionaries. -- Craig Ringer -- 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] Setting up phppgadmin under https/ssl (Apache)

2008-05-19 Thread Craig White
ing under SSL. Can someone step me > > through the process? I wouldn't recommend making phppgadmin available from the Internet in any form but... SSLRequireSSL would require SSL to access...adjust paths to suit. I also would require user authentication to access the path (I us

Re: [GENERAL] F-Secure and PostgreSQL

2008-05-23 Thread Craig Ringer
able the windows one. Additionally, they sometimes leave the IP stack in a rather messed up state, so you might need to run: netsh interface ipv4 reset (on XP a logfile path argument may need to be appended) On a side note, I would personally want to use a UNIX/Linux based DB server for anything b

Re: [GENERAL] XML Support related questions

2008-05-23 Thread Craig Ringer
sql.ps+postgresql+gist+xml&hl=en&ct=clnk&cd=1&gl=au&client=firefox-a (early hit in a search for `postgresql gist xml') -- Craig Ringer -- 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] Copying data from a table to another database

2008-05-25 Thread Craig Ringer
ise lots of people do. If all the above completely misses the point then either I've totally misread your question or you might want to explain it in a bit more detail. -- Craig Ringer -- 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] New MS patent: sounds like PG db rules

2008-05-29 Thread Craig Ringer
it's really up to the glacially-slow-but-promising patent reform efforts and to an extend the companies that extend and build on Pg. -- Craig Ringer -- 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] Converting empty input strings to Nulls

2008-05-31 Thread Craig Ringer
can't_be_altered Personally, though, if at all possible I'd fix the broken client application. "" is NOT NULL . If you don't fix it, consider at least clearly documenting the wacky behaviour and if possible applying it only to an updatable view rather than the base table. --

Re: [GENERAL] Maintaining an index on a large table: Is there any potential for it to stall my application?

2008-06-02 Thread Craig Ringer
worker sticks to one thread you should be just fine. Getting the completion notification, cancellation, error reporting, etc etc etc right in a concurrent environment could be fun though. I'd want to stick to a job queue as much as possible, personally. -- Craig Ringer -- 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] Tripping up on my first attempt at building PG from source

2008-06-05 Thread Craig Ringer
7;re going to make this might be more hassle than it's worth. -- Craig Ringer -- 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] when to reindex?

2008-06-06 Thread Craig Ringer
the way, I also just run into this message: http://unixadmintalk.com/f48/measuring-table-index-bloat-352483/ when doing a quick search. It might be useful. -- Craig Ringer -- 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] fitler database list

2008-06-09 Thread Craig Ringer
psql? JDBC? Something else? -- Craig Ringer -- 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] Unable to dump database using pg_dump

2008-06-11 Thread Craig Ringer
Adam Dear wrote: pg_dump: query to obtain list of schemas failed: ERROR: more than one row returned by a subquery used as an expression Is the pg_dump command from the old postgresql install or the new one? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Unable to dump database using pg_dump

2008-06-12 Thread Craig Ringer
erwards. For decent performance you might also want to drop foreign key constraints and indexes during bulk load with COPY, then recreate them afterwards. pg_dump and pg_restore do all this for you, but nothing stops you from doing it manually. -- Craig Ringer -- 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] file system level backup

2008-06-12 Thread Craig Ringer
ersion must be the same except for the patchlevel, eg "8.2.1" is compatible with "8.2.3" but not "8.3.1". In general it is MUCH SAFER to just use pg_dump and pg_restore to migrate your data. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Stored procs / functions - execution failure

2008-06-14 Thread Craig Ringer
efined your function with a mixed case name, and you're being bitten by case folding. You probably meant to write: select "sp_scheduleFromDate"('2008-01-01') not select sp_scheduleFromDate('2008-01-01') The former suppresses lowercase foldi

Re: [GENERAL] inserting to a multi-table view

2008-06-16 Thread Craig Ringer
into "student". This seems as though it must be a common situation. Have you considered using table inheritance to solve this? It has some limitations, and I've never seen the need myself, but it sounds like it might fit your needs. http://www.postgresql.org/docs/8.3/static/ddl

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Craig Ringer
hose dumps somewhere safe, because I suspect your _old copy will be useless. Then use 8.3's initdb on a new, empty directory, verify that the config files are correct, and start the 8.3 server. -- Craig Ringer -- 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] Controlling write access to a table

2008-06-18 Thread Craig Ringer
role.html If your users all log in with the same username and password via some kind of web app, persistence layer, or whatever, then you will have to write the access control yourself at the application level. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@post

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