Re: [GENERAL] How to raise error from PostgreSql SQL statement if some condition is met

2012-08-12 Thread Craig Ringer
On 08/12/2012 06:02 PM, Andrus wrote: ... RaiseException(text, variadic text[]) .. VARIADIC is keyword, not datatype Thank you. I tried code below but got error shown in comment. No idea what I'm doing wrong. Andrus. CREATE OR REPLACE FUNCTION RaiseException(text, variadic text[] ) RET

Re: [GENERAL] Migrating Postgresql 8.0 to 8.3

2012-08-13 Thread Craig Ringer
from 8.0 to 8.3. Also, please consider 8.3 as a stepping stone to 9.1, which should be your migration target. 8.3 will be leaving support early next year: http://www.postgresql.org/support/versioning/ so it is not a good choice for an upgrade target. -- Craig Ringer

Re: [GENERAL] PG Installer - Licensing Issues

2012-08-16 Thread Craig Ringer
on the correct use of the .zip binary packages as an alternative for bundling with an application? -- 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] PG Installer - Licensing Issues

2012-08-16 Thread Craig Ringer
On 08/16/2012 06:46 PM, Andrew Hastie wrote: Thanks for your thoughts Craig, the issue with users having an existing PG installation is a definite concern. It sounds like you're recommending using the "ZIP Binaries", at least for MS Win installs I wouldn't go as far as r

Re: [GENERAL] Views versus user-defined functions: formatting, comments, performance, etc.

2012-08-18 Thread Craig Ringer
" or whatever) down into the index- and table-scans used by the view, reducing the amount of data that has to be processed. That's not always the case, so use of EXPLAIN ANALYZE and some tweaking of a view or query that uses a view is sometimes necessary. Mostly it "just works"

Re: [GENERAL] Schemas vs partitioning vs multiple databases for archiving

2012-08-18 Thread Craig Ringer
t's limiting the system. Turn checkpoint logging on and examine the Pg log files to see if you're checkpointing too often. -- 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] citext: citext=text is case sensitive

2012-08-19 Thread Craig Ringer
text_ne, RESTRICT = neqsel, JOIN = neqjoinsel ); It's possible to extend the above for the other operators by following the same pattern. See the contents of the citext--1.0.sql extension script for definitions. -- 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] How hard would a "path" operator be to implement in PostgreSQL

2012-08-19 Thread Craig Ringer
ly help get rid of a huge amount of the ugliness ORMs currently do with de-duplicating results after doing huge left outer join chains. -- 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] importing updated files into a database

2012-08-19 Thread Craig Ringer
don't waste everybody's time repeating what's already been said somewhere else and they can get onto new ideas. Linking to the question also helps anybody who discovers your post in a search later to find more information. -- Craig Ringer

Re: [GENERAL] How hard would a "path" operator be to implement in PostgreSQL

2012-08-20 Thread Craig Ringer
n key, but can be by a general join condition. +1 on that, and the same is true with other object/relational work. A relationship is broader than a foreign key. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Grant problem and how to prevent users to execute OS commands?

2012-08-20 Thread Craig Ringer
lready run OS commands on their computer, so that doesn't matter. If they connect remotely over another client like PgAdmin-III, PgJDBC, psqlODBC, or whatever, they can't run OS commands at all. -- 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] How hard would a "path" operator be to implement in PostgreSQL

2012-08-21 Thread Craig Ringer
of an issue. That's part of the reason I was thinking about the utility of the JSON support for this, because with a few aggregate operators etc it'd be a fairly low impact solution. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes t

Re: [GENERAL] Are there any options to parallelize queries?

2012-08-21 Thread Craig Ringer
#x27;ve added parallel features trying to merge their work back into mainline. If you have a commercial need, perhaps you can find time to fund work on something that'd help you out, like honouring effective_io_concurrency for sequential scans? -- Craig Ringer -- Sent via

Re: [GENERAL] Grant problem and how to prevent users to execute OS commands?

2012-08-21 Thread Craig Ringer
You appear to have replied directly to me rather than the list, so I've cc'd the list. On 08/21/2012 10:11 PM, Evil wrote: Dear Craig Ringer And Dear Thom! THANK YOU VERY MUCH for such Great and easy explanation! Now everything seems is kk with grants.From now i think i understa

Re: [GENERAL] Performance implications of numeric?

2012-08-21 Thread Craig Ringer
at require the precision) and forcing developers to use explicit casting be worth the time? Without knowing your workload and your constraints, that's a "how blue is the sky" question. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Amazon High I/O instances

2012-08-21 Thread Craig Ringer
n you mostly need storage and you don't care about performance or storage reliability; it's a local HDD so you get great gobs of storage w/o paying per GB. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Performance implications of numeric?

2012-08-22 Thread Craig Ringer
/functions-admin.html) doesn't seem to explicitly say that for pg_total_relation_size though it does for pg_relation_size and other functions. Use pg_size_pretty to convert bytes to "human" values for display. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] NULL value comparison

2012-08-22 Thread Craig Ringer
to treat it as "unknown" just leads to confusion. It'd be nice if SQL had separate "UNKNOWN" and "NO_VALUE_OR_NA" keywords instead of "NULL", but alas, it doesn't - and I'm not sure that'd cover all the cases either. -- 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] NULL value comparison

2012-08-22 Thread Craig Ringer
o transforming "= NULL" to "IS NOT NULL"; it doesn't actually change the semantics of NULL. http://www.postgresql.org/docs/9.1/interactive/runtime-config-compatible.html#GUC-TRANSFORM-NULL-EQUALS -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Can column name aliases be supported?

2012-08-22 Thread Craig Ringer
different clients, with appropriate DO INSTEAD triggers (9.1) or rules (9.0 and below). (a) would be awfully tempting. -- 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] NULL value comparison

2012-08-22 Thread Craig Ringer
7;m curious now. -- 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] Can column name aliases be supported?

2012-08-22 Thread Craig Ringer
-programmers-believe-about-names/ and while you're at it, read this: http://www.joelonsoftware.com/articles/Unicode.html -- 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] Amazon High I/O instances

2012-08-23 Thread Craig Ringer
tails were particularly necessary until it got pulled off-track. I'll be interested to hear if you have any results Sébastien, or if anyone else does. It's good to have data on the increasingly popular cloud platforms out there. -- Craig Ringer -- Sent via pgsql-general mailing

Re: [GENERAL] Can column name aliases be supported?

2012-08-23 Thread Craig Ringer
http://sixrevisions.com/project-management/how-to-fire-bad-clients/ -- 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] FETCH in subqueries or CTEs

2012-08-23 Thread Craig Ringer
) SELECT * FROM x; ERROR: syntax error at or near "FETCH" LINE 1: WITH x AS ( FETCH ALL FROM somecursor ) SELECT * FROM x; -- 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] Can column name aliases be supported?

2012-08-23 Thread Craig Ringer
obably not. With a `DO INSTEAD` view trigger - available in Pg 9.1 and above - yes. I'd recommend using a view trigger instead of a rule if at all possible. Rules are tricksy things and sooner or later they'll bite you. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Confirming \timing output

2012-08-23 Thread Craig Ringer
, many setups still can't type anything outside 7-bit ASCII even in 2012 :-( -- 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 9.1 on VMWare ESXi 5.0

2012-08-23 Thread Craig Ringer
virtual and physical, compare. If it's complicated, post both to explain.depesz.com . Examine `iostat`, `vmstat` and `top` to see where the bottlenecks lie. etc. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] FETCH in subqueries or CTEs

2012-08-24 Thread Craig Ringer
NSERT INTO sometable FETCH ALL FROM somecursor; ... which could be handy with PL/PgSQL functions that return multiple refcursors. It only seems to be possible via a PL/PgSQL wrapper that loops over the cursor and returns a rowset. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-gene

Re: [GENERAL] Windows SIngle Sign On - LINUX Server

2012-08-24 Thread Craig Ringer
http://technet.microsoft.com/en-us/library/bb742516.aspx Use Kerberos via GSSAPI. Here's a good starting point by Marcus: http://www.hagander.net/talks/Deploying%20PostgreSQL%20in%20a%20Windows%20Enterprise.pdf -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgres

Re: [GENERAL] FETCH in subqueries or CTEs

2012-08-25 Thread Craig Ringer
On 08/24/2012 10:31 PM, Tom Lane wrote: Craig Ringer writes: I didn't find a reasonable way to simply fetch a cursor into a (possibly temporary) table, like: INSERT INTO sometable FETCH ALL FROM somecursor; Why would you bother with a cursor, and not just INSERT ... SELECT using the ori

Re: [GENERAL] Windows SIngle Sign On - LINUX Server

2012-08-25 Thread Craig Ringer
On 08/25/2012 04:29 AM, Jeremy Palmer wrote: Marcus' guide looks great. So what's the pros/cons of using the Kerberos via GSSAPI method, rather than going for the SingleSignOn method mentioned by Sunday? The method on the Ubuntu wiki applies to the host OS as a whole. Pg will still need to k

Re: [GENERAL] PGBouncer Connection Using Perl DBI

2012-08-26 Thread Craig Ringer
PostgreSQL server, specify the details for the PgBouncer server that's proxying for 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] 9.2 and index only scans

2012-08-28 Thread Craig Ringer
sense for index-oriented tables, but otherwise ... ugh. -- 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] Is it nonsense (read: stupid) to keep count of child entries via triggers and a custom table?

2012-08-28 Thread Craig Ringer
can be important to avoid unexpected concurrency 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] FGS - Postgresql server install

2012-08-28 Thread Craig Ringer
n, you should probably ask the tech support of the 3rd party that packages and prepares it. -- 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] calling a C function from pgsql function

2012-08-29 Thread Craig Ringer
in the order they appear in the PL/PgSQL function. -- 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] String comparision in PostgreSQL

2012-08-29 Thread Craig Ringer
;s just a matter of needing someone with the desire and time (or funding) and expertise to design and build it, or if there'd be issues with getting it accepted. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] SQLSTATE XX000 Internal Error 7

2012-08-29 Thread Craig Ringer
Difference() function on two large geometries. I'm running OSX 10.8 (Mountain Lion) Postgresql 9.4.1 Did you mean 8.4.1? -- 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] [BUGS] PostGreSQL pgdac - C++ Builder 2007

2012-08-30 Thread Craig Ringer
if replying, please reply to the mailing list or use reply all, rather than replying to me directly. -- 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][postgis-users] pg_dump -s should use add_geometrycolumn(...)

2012-08-30 Thread Craig Ringer
e the documentation. You don't have to set search_path in postgresql.conf ; it can be set per-session with `SET search_path` and can also be set per-user, per-database and per-function. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Craig Ringer
on't know which other database systems you're talking about because you've never specifically named any. It's entirely possible that some other DBMSs use the system locale and collation support with internal downcasing, for example. All I know, I've already said, but I&#x

Re: [GENERAL] String comparision in PostgreSQL

2012-08-30 Thread Craig Ringer
professional_support/ . This is not a trivial job. It will help if you are able to provide *specific* *test* *cases* showing exactly how you think it should work, with samples showing how it works on other specifically named products. No more hand-waving. -- Craig Ringer

Re: [GENERAL] Need help on autovacuum in postgres 9.1.2

2012-08-30 Thread Craig Ringer
r the right thing to do; if anything you should usually be turning it *up*. -- 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] Would my postgresql 8.4.12 profit from doubling RAM?

2012-08-30 Thread Craig Ringer
On 08/30/2012 07:42 PM, Alexander Farber wrote: Hello, I run CentOS 6.3 server with 16 GB RAM and: postgresql-8.4.12-1.el6_2.x86_64 pgbouncer-1.3.4-1.rhel6.x86_64 The modified params in postgresql.conf are: max_connections = 100 shared_buffers = 4096MB and the pgbouncer run

Re: [GENERAL] psql & unix env variables

2012-08-30 Thread Craig Ringer
dings. -- 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] CASE/WHEN behavior with NULLS

2012-09-02 Thread Craig Ringer
+ 2 + 3= 6 1 + 2 + NULL = NULL so obviously sum(y) FROM ( VALUES (1),(2),(3) ) x(y) = 6 sum(y) FROM ( VALUES (1),(2),(NULL) ) x(y) = NULL right? No, actually sum() over 1,2,NULL is 3, not NULL. NULL isn't consistent. -- Craig Ringer -- Sent via pgsql-general ma

Re: [GENERAL] Reduce the time to know trigger_fi​le's existence

2012-09-03 Thread Craig Ringer
be useful: http://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F -- 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] Reduce the time to know trigger_fi​le's existence

2012-09-03 Thread Craig Ringer
then adding backend/port/ implementations for various platforms, as well as taking the current code and splitting it out into a port file that gets used if no other is chosen. This page is likely to be useful: http://wiki.postgresql.org/wiki/So,_you_want_to_be_a_developer%3F -- Craig Ringer

Re: [GENERAL] Reduce the time to know trigger_fi​le's existence

2012-09-04 Thread Craig Ringer
ady understood for the purpose - makes a lot more sense. He should know, given how much work he's done on the 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] Maintaining a materialized view only on a replica

2012-09-04 Thread Craig Ringer
lication system that guaranteed ordering if at all possible. -- 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] MS Sync framework sync SQL Server 2012 to PostgreSQL 9

2012-09-04 Thread Craig Ringer
educe the amount of wasted/duplicated time and effort that might otherwise arise. http://stackoverflow.com/questions/12272676/use-ms-sync-framework-to-sync-sql-server-2012-to-postgres-9 -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] postgres process got stuck in "notify interrupt waiting" status

2012-09-05 Thread Craig Ringer
even then you'll have to bypass the shared memory lockout (unless you're on Windows). -- 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] Performance issue with cross table updates

2012-09-10 Thread Craig Gibson
ients, else I would have just done a simple drop and rename post the COPY. Kind Regards Craig -- 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] Index creation takes more time?

2012-09-16 Thread Craig Ringer
Herouth, I don't know if you saw Tomas Vondra's follow-up, as it was only to the list and not CC'd to you. Here's the archive link: http://archives.postgresql.org/message-id/e87a2f7a91ce1fca7143bcadc4553...@fuzzy.cz The short version: "More information required". On 09/09/2012 05:25 PM, Hero

Re: [GENERAL] foreign key from array element

2012-09-17 Thread Craig Ringer
esql.org/action/patch_view?id=900 and the linked discussions. -- 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] log_destination = csvlog, line breaks interfere in analysis

2012-09-17 Thread Craig Ringer
place? It's not perfect, but it goes a long way toward improving confidence in changes to big (or small) codebases. -- 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] RFE: Column aliases in WHERE clauses

2012-09-17 Thread Craig Ringer
ething like: SELECT FROM thetable WHERE first_letter > 'a' RESULTS left(value,1) AS first_letter or something, where the order is more obvious. I really dislike the way SQL is written not-quite-backwards. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@p

[GENERAL] Data recovery after inadvertent update?

2012-09-18 Thread Craig Ringer
tuple', `adminpack', etc. Am I right in guessing that they're pretty much going to require hand data recovery or the use of some custom C extension code to get at the data - if it still exists? -- Craig Ringer

Re: [GENERAL] RFE: Column aliases in WHERE clauses

2012-09-19 Thread Craig Ringer
ation to effectively clone the aliased SELECT term into the WHERE clause? If so, what about functions with side-effects? -- 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] drop table if exists ;

2012-09-19 Thread Craig Ringer
ntion is to DROP the object despite the type mismatch, or to ignore it because it's not the type of object they specified to drop. When something is ambiguous or unclear, PostgreSQL will tend to report an error for safety. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-ge

[GENERAL] Getting a leading zero on negative intervals with to_char?

2012-09-19 Thread Craig Ringer
als wildly differently to Oracle anyway: http://sqlfiddle.com/#!4/d41d8/2751 <http://sqlfiddle.com/#%214/d41d8/2751> and it looks like Oracle handling of intervals isn't much like Pg anyway: http://stackoverflow.com/questions/970249/format-interval-with-to-char Arose from trying to find a non-ugly solution to this SO post: http://stackoverflow.com/questions/12335438/server-timezone-offset-value/12338490#12338490 -- Craig Ringer

Re: [GENERAL] pg_dump, send/recv

2012-09-19 Thread Craig Ringer
what uses them? Are they only an optional optimization for storing binary data in the database? I don't know what *else* they're used for, but there's a binary wire protocol (albeit a rarely used one) that I'm pretty sure uses them. -- Craig Ringer -- Sent via pgsql-ge

Re: [GENERAL] Passing row set into PL/pgSQL function.

2012-09-19 Thread Craig Ringer
/06/10/why-is-upsert-so-complicated/ -- 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] Passing row set into PL/pgSQL function.

2012-09-20 Thread Craig Ringer
CT funky_upsert('table', ARRAY['col1','col2'], 'some_curs'); CLOSE some_curs; Internally it could fetch rows from the refcursor into record fields and do what it needed. Personally I'd just do the work app-side. -- Craig Ringer -- Sent via pgsql-

Re: [GENERAL] Need psql send email

2012-09-20 Thread Craig Ringer
database. -- 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] Using psql -f to load a UTF8 file

2012-09-20 Thread Craig Ringer
and treat it as such, rather than mangling it by interpreting it as the local system encoding. psql should accept UTF-8 with BOM. -- 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] 9.1 vs 8.4 performance

2012-09-22 Thread Craig Ringer
On 09/21/2012 10:32 PM, salah jubeh wrote: I am running queries sequentially on each machine using a database dumped from a life server , and 9.1 server is much slower than 8.4. https://wiki.postgresql.org/wiki/Slow_Query_Questions More detail needed. -- Craig Ringer -- Sent via pgsql

Re: [GENERAL] Question about permissions on database.

2012-09-22 Thread Craig Ringer
-role That while that question is about 8.4 so it doesn't cover ALTER DEFAULT PRIVILEGES (http://www.postgresql.org/docs/current/static/sql-alterdefaultprivileges.html), which is the right way to to solve this going forward. It should be useful, though. -- Craig Ringer -- Sent via

[GENERAL] pg_typeof equivalent for numeric scale, numeric/timestamp precision?

2012-10-01 Thread Craig Ringer
eed to do this from C with a custom function, or via libpq's metadata APIs? And re format_type, am I misunderstanding it or is it just busted for numeric? -- 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] Game Server Lags

2012-10-02 Thread Craig Ringer
Use a front-end cache like memcached. -- 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] pg_typeof equivalent for numeric scale, numeric/timestamp precision?

2012-10-03 Thread Craig Ringer
On 10/03/2012 05:50 AM, Martijn van Oosterhout wrote: On Tue, Oct 02, 2012 at 10:19:18AM +0800, Craig Ringer wrote: Hi all While examining a reported issue with the JDBC driver I'm finding myself wanting SQL-level functions to get the scale and precision of a numeric result from an oper

Re: [GENERAL] pros and cons of two security models

2012-10-03 Thread Craig Ringer
-authentication-approach-for-financial-app-on-postgresql When you cross-post, please link. -- 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] Building an home computer for best Poker Tracker performance

2012-10-04 Thread Craig Ringer
is "as much RAM as you can afford". b. How many cpu processors should I assign to my VM?. Should I try assigning 2-4 CPUs for actual play? And if I do, is there an objective way to measure performance? Get rid of the VM. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] Moving from Java 1.5 to Java 1.6

2012-10-05 Thread Craig Ringer
DBC on a new Java to support a truly ancient Pg like 7.4. -- 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] CTE materializing sets?

2012-10-09 Thread Craig Ringer
. I'd expect it'd materialize to RAM if the result is within `work_mem` but I'd love to know for sure. -- 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] CTE materializing sets?

2012-10-09 Thread Craig Ringer
imple rewrite. -- 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] moving from MySQL to pgsql

2012-10-10 Thread Craig Ringer
kup process too. With PostgreSQL you have a couple of options, including log archiving, periodic dumps, and warm standby. Please read the backup chapter of the manual in detail. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] Shorthand syntax for triggers

2012-10-10 Thread Craig Ringer
elieve it doesn't matter what you return here. This is a trivial convenience, but not one I'd be against. 5. Way less repetitive typing. If you're repeating the same triggers over and over you may want to look at writing them to be re-usable. See eg: http://wiki.po

Re: [GENERAL] Storing large files in multiple schemas: BLOB or BYTEA

2012-10-10 Thread Craig Ringer
lowing the cost of reading and discarding rarely-changed large objects to be avoided. -- 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] moving from MySQL to pgsql

2012-10-11 Thread Craig Ringer
erence between SMALLINT and BOOLEAN (or TINYINT if Pg supported it) is 1 byte per column. If you had 30 smallint columns and quite a few million rows it might start making a difference, but it's *really* not worth obsessing about. Unless you have high-column-count tables that contain nothing bu

Re: [GENERAL] auto-increment field : in a simple way

2012-10-11 Thread Craig Ringer
longhand way. If you're creating few enough tables that you care about the syntax of defining an unusually small data type for a generated primary key, you're creating few enough that the space doesn't actually matter. -- Craig Ringer -- Sent via pgsql-general mailing

Re: [GENERAL] auto-increment field : in a simple way

2012-10-11 Thread Craig Ringer
olname < 32768)); ); With this constraint, whether the storage space requirement would reduce? OR Is it just for validation of data? It's purely validation and has no effect on storage size. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Craig Ringer
On 10/11/2012 05:07 PM, Vineet Deodhar wrote: On Thu, Oct 11, 2012 at 1:12 PM, Craig Ringer mailto:ring...@ringerc.id.au>> wrote: The difference between SMALLINT and BOOLEAN (or TINYINT if Pg supported it) is 1 byte per column. If you had 30 smallint columns and quite a few m

Re: [GENERAL] Improve MMO Game Performance

2012-10-13 Thread Craig Ringer
the quickest-and-dirtiest settings possible. I might not even store the transient data in Pg at all, I might well use a system that offers much weaker consistency, atomicicty and integrity guarantees. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
what little surge protection they offer is done with a component that wears out after absorbing a few surges, becoming totally ineffective. Since your system should be crash-safe a cheap UPS will do nothing for corruption protection, it'll only help with uptime. -- Craig Ringer -- Sent

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
On 10/14/2012 11:00 AM, John R Pierce wrote: On 10/13/12 7:13 PM, Craig Ringer wrote: * Use a good quality hardware RAID controller with a battery backup cache unit if you're using spinning disks in RAID. This is as much for performance as reliability; a BBU will make an immense differen

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
On 10/14/2012 05:53 AM, Heine Ferreira wrote: Hi Are there any best practices for avoiding database corruption? I forgot to mention, you should also read: http://www.postgresql.org/docs/current/static/wal-reliability.html -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] citext question

2012-10-13 Thread Craig Ringer
in how they are stored, and there's no advantage to using "varchar" over "text". It's similar with citext. While citext doesn't accept a typmod to constrain its length, you can and should use CHECK constraints as appropriate in your data definitions. --

Re: [GENERAL] database corruption questions

2012-10-13 Thread Craig Ringer
e always done in the past, but others here are much more experienced with testing gear into production. You can also use pg_test_fsync and diskchecker.pl . See: http://www.postgresql.org/docs/current/static/wal-reliability.html I do repeated plug-pull tests and make sure fsync is being honour

Re: [GENERAL] Re: [GENERAL] Mapping PostgreSQL data types to DB2 Federated Server

2012-10-14 Thread Craig Ringer
On 10/15/2012 09:37 AM, Alexander Gataric wrote: The IBM people aren't being helpful so I thought I'd ask here. Try dba.stackexchange.com . -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

Re: [GENERAL] Error 42704 - does mean what?

2012-10-15 Thread Craig Ringer
27;]), (ARRAY['c','d'])) SELECT array_agg(x) FROM arr; ERROR: could not find array type for data type text[] -- 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] NOTIFY/LISTEN in Postgresql

2012-10-15 Thread Craig Ringer
ing for. Details? Again, an advisory lock may be a candidate. -- 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] SO issue: src/tutorial of 8.3.x fails to compile on Cygwin

2012-10-15 Thread Craig Ringer
of function 'SET_VARSIZE' ... followed by a linker error funcs.o:funcs.c:(.text+0xb6): undefined reference to `_SET_VARSIZE' that's caused by the compiler's assumption tht SET_VARSIZE is a function since the macro doesn't seem to have been included. -- Craig Ringer

Re: [GENERAL] Application takes longer time to fetch large no of records from Postgresql 9.0.3

2012-10-15 Thread Craig Ringer
epeat myself. Please read this: https://wiki.postgresql.org/wiki/Slow_Query_Questions then follow up with a complete question including exact query text, EXPLAIN (ANALYZE, BUFFERS) results, etc. -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] Application takes longer time to fetch large no of records from Postgresql 9.0.3

2012-10-16 Thread Craig Ringer
On 10/16/2012 12:40 PM, Craig Ringer wrote: On 10/16/2012 12:24 PM, Deven Thaker wrote: Hi, My application takes longer time (we see time out even) when data to be fetched from Postgresql 9.0.3 is around 190 records. I am doing an improvement at application level, but from database side any

Re: [GENERAL] Does Postgres Object-Relational Syntax follow Standard?

2012-10-16 Thread Craig Ringer
On 10/17/2012 05:00 AM, Will Rutherdale (rutherw) wrote: Hi. I was having a discussion with people at work about the Postgres object-relational syntax. What syntax specifically? Do you mean table inheritance and SELECT ONLY ? -- Craig Ringer -- Sent via pgsql-general mailing list (pgsql

[GENERAL] 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered

2012-10-16 Thread Craig Ringer
the insertion of "Bob" in the other transaction to violate serializability? -- Craig Ringer

Re: [GENERAL] allow servers to access to the same data

2012-10-17 Thread Craig Ringer
o do and why, so better advice can be offered. -- 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] allow servers to access to the same data

2012-10-17 Thread Craig Ringer
ongly recommend that you use replication instead. See http://www.postgresql.org/docs/current/static/high-availability.html <http://www.postgresql.org/docs/8.3/static/high-availability.html> http://wiki.postgresql.org/wiki/Shared_Storage -- Craig Ringer

<    6   7   8   9   10   11   12   13   14   15   >