[GENERAL] = ANY (SELECT ..) and type casts, what's going on here?

2011-06-15 Thread Russell Smith
Hi, Is anybody able to explain the following behaviour? Server is 8.4.7 RHEL5 build. Also happens on 8.4.8 Ubuntu x64 package. mr-russ=# SELECT 'BU'::varchar = ANY ((select '{BU,CI}'::varchar[])); ERROR: operator does not exist: character varying = character varying[] LINE 1: SELECT 'BU'::var

Re: [GENERAL] No PL/PHP ? Any reason?

2010-06-23 Thread Russell Smith
On 23/06/10 02:16, Joshua D. Drake wrote: > On Tue, 2010-06-22 at 13:51 +, Greg Sabino Mullane wrote: > >>> Is there any technical obstacle to anyone creating PL/PHP? I am >>> cruious as to why it doesn't alreay exist. >>> >> Obviously we need to improve our documentation. What led y

Re: [GENERAL] A maybe-bug?

2010-01-07 Thread Russell Smith
Tom Lane wrote: > Vincenzo Romano writes: > >> I tried this: >> tmp1=# CREATE DOMAIN real as numeric; >> [ and got confused between this domain and the built-in "real" ] >> > > >> It looks like to me this is a bug and also the documentation seems to >> confirm: >> "The domain name must

Re: [GENERAL] Why are there pg_dump errors in my Apache httpd error_log ? (Postgres 8.3.7 on CentOS 5)

2009-11-03 Thread Russell Smith
Aleksey Tsalolikhin wrote: > Hi. I just found pg_dump errors in my Apache httpd log and am really > confused. Has anybody seen this before? > > My syslog.conf does not mention the httpd error_log. > > How did the errors get in there? > > # grep pg_dump /var/log/httpd/error_log > pg_dump: [archiv

Re: [GENERAL] can someone help me to make a sql more pretty and more concise?

2008-11-13 Thread Russell Smith
Yi Zhao wrote: > I want to select some column(a, b) from the table with the specified > condition, so, i can do like this: > select a, b from mytable where id = (select id from temptable where > tname = 'df' ) and stype = 'def' and range = 'afk' > How about; SELECT a, b, count(1), sum(c) FROM

Re: [GENERAL] ODBC driver crash

2008-09-30 Thread Russell Smith
Craig Ringer wrote: > Hi > The crash occurs whether a file, system, or user DSN is being used. > I can reproduce this on two different machines. It happens with or > without SSL in use. It affects any Access 2007 database with a > PostgreSQL ODBC connection in use, including a newly created blank >

Re: [GENERAL] libpq block allocated before my malloc handler inits?

2008-06-29 Thread Russell Smith
rob wrote: > I am trying to build a small program with libpq as the interface to a > Postgre database. I am using the most current version. My program > uses malloc and free hooks to manage memory without having to request > memory from the system all the time. I expected that the init > functio

Re: [GENERAL] postgre vs MySQL

2008-03-14 Thread Russell Smith
place. And now I use MySQL when I have to because PostgreSQL does the job for me and I'm used to writing SQL, plpgsql and the like for it. Russell Smith -- 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] postgre vs MySQL

2008-03-12 Thread Russell Smith
Scott Marlowe wrote: On Tue, Mar 11, 2008 at 7:33 PM, Justin <[EMAIL PROTECTED]> wrote: I view updates/patches of any kind like this, if ain't broke don't fix it. I normally only update computers with security patches only after i prove it don't destroy installs. But that's juast it.

Re: [GENERAL] Constraint violations don't report the value that violates

2008-02-07 Thread Russell Smith
a elements from the parent table. Or am I missing something about the complexity that I can make indexes? Regards Russell Smith ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Constraint violations don't report the value that violates

2008-02-06 Thread Russell Smith
oreign key case always reports the value that is violating. None of the other cases do. If all cases could report the error it would assist greatly in bulk load/INSERT INTO SELECT type queries. Is this possible or difficult? or has nobody had the inclination? Thanks Russell Smith ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-19 Thread Russell Smith
In the long run, for queries inserting many rows it might be interesting to accumulate all the entries intended for a btree index and sort them before inserting. Not sure about possible downsides of that. If you add ORDER BY to the query, do you get different results? The timing may be bette

Re: [GENERAL] raw data into table process

2007-08-22 Thread Russell Smith
novice wrote: I am trying to record the following entries into a table. I'm curious to know if there's an efficient/effective way of doing this? This entries come from an ancient datalogger (note: separated by space and uses YY/MM/DD format to record date) Plain file sample.dat 3665 OK

Re: [GENERAL] Working between Windows and Unix

2007-04-02 Thread Russell Smith
Erick Papadakis wrote: Hello: I am working on Windows and Unix with Postgresql (newbie, so please be kind). I use phppgadmin on both platforms. Windows is my local machine. Linux (CentOS as usual) is the cpanel thing that my hosting provider offers. Basically this setup works well and I am lear

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-19 Thread Russell Smith
ffective anyway will it? If vacuum of a big table was done in multiple transactions you could reduce the effect of long running vacuum. I'm not sure how this effects the rest of the system thought. Russell Smith

Re: [GENERAL] Remove duplicate rows

2007-01-11 Thread Russell Smith
re not really asking a meaningful question... foo bar 1 1 1 2 now, you are selecting foo, but you want to order by bar. What decision should be made about which value of bar to pick, so you can order on it? Regards Russell Smith Does anybody know how to remove duplicate rows from

Re: [GENERAL] Problems With VIEWS

2007-01-11 Thread Russell Smith
Bernd Helmle wrote: On Thu, 11 Jan 2007 06:36:34 -0800 (PST), Richard Broersma Jr <[EMAIL PROTECTED]> wrote: Either way. I like to create sql files with all of the DDL for creating the view and rules. Overtime, if I need to change my view or reconfigure the rules, I can edit my sql file a

Re: [GENERAL] need help with plpgsql execute insert

2006-12-20 Thread Russell Smith
[EMAIL PROTECTED] wrote: I am trying to loop through some data and then run insert some of the resulting data into a new table. I can create the function but when I run it i get the error: ERROR: query "SELECT 'INSERT INTO payment ( id,amount,accepted_date, company_id , date , patient_respon

Re: [GENERAL] Autovacuum Improvements

2006-12-20 Thread Russell Smith
hought and discussion with others to come up with something that will work well. Regards Russell Smith ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Russell Smith
whole database, does the vacuum remove all the tuples that are dead? Is it possible to add logic for lazy vacuum that takes the lowest TID in our database when not vacuuming shared catalogs? This may already be the case, I don't know. Just putting forward suggesti

Re: [GENERAL] fatal error on 8.1 server

2006-12-02 Thread Russell Smith
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: Tony Caduto wrote: I did not have autovacuum turned on and I usually do a vacuumdb -z -a -f -q each night but this one slipped through the cracks :-( Strange -- autovacuum should have started an automatic database-

Re: [GENERAL] pg_hba.conf

2006-11-19 Thread Russell Smith
Tom Allison wrote: Ran into a mystery that I can't seem to figure out I want to authenticate using SSL for all external IP addresses that I have in my subnet. I also want to be able to authenticate via non-SSL for localhost (not unix socket). I thought something like this would work:

Re: [GENERAL] Eliminating bad characters from a database for upgrading

2006-11-16 Thread Russell Smith
Gregory S. Williamson wrote: Dear list, I have been banging my head against a problem for a few days now, and although I am making progress it is painfully slow, and I am hoping that some one out there can steer me in a better way. I've got a medium size database (7.4), about 64 gigs of data,

[GENERAL] Changing the number and type of columns in a view

2006-11-09 Thread Russell Smith
views. I know you can drop an recreate the view, but if the view has dependent objects it becomes more difficult. I'm currently running 8.1 when I say it's not possible. Thanks Russell Smith ---(end of broadcast)--- TIP 6: explain

Re: [GENERAL] planer picks a bad plan (seq-scan instead of index)

2006-11-09 Thread Russell Smith
tual time=177.033..177.033 rows=37417 loops=1) -> Seq Scan on movies (cost=0.00..8194.93 rows=82893 width=214) (actual time=0.118..129.716 rows=37417 loops=1) Total runtime: 24419.939 ms 2 rows fetched shouldn't the planer join the additional table *after* filtering?

Re: [GENERAL] ERROR: tuple concurrently updated

2006-11-05 Thread Russell Smith
Tom Lane wrote: Russell Smith <[EMAIL PROTECTED]> writes: I got this error the other day, I was under the impression that vacuum could get a concurrently updated tuple. I could be wrong. It is possible for somebody to quickly explain this situation? Message follows; va

[GENERAL] ERROR: tuple concurrently updated

2006-11-04 Thread Russell Smith
"sqlfilter" failed: ERROR: tuple concurrently updated Thanks Russell Smith ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your

Re: [GENERAL] php postgresql

2006-03-02 Thread Russell Smith
Mary Adel wrote: I am wondering how i can call stored procedure from php If anyone can help it would great for me Very small code snippet. $sql = "SELECT my_func('para')"; $Result = pg_query($sql); ... Regards Russell Smith

Re: [GENERAL] Which indexes does a query use?

2006-02-26 Thread Russell Smith
further, but that is my best guess from the information given. Regards Russell Smith Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 3: Have you checked our extensiv

[GENERAL] Object ownership in a new database

2006-02-13 Thread Russell Smith
to be different. I expected it to be owned by "non_superuser". Any comments welcome. Russell Smith ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Old problem needs solution

2005-06-03 Thread Russell Smith
On Sat, 4 Jun 2005 09:25 am, Alvaro Herrera wrote: > On Fri, Jun 03, 2005 at 05:55:36PM -0500, Gerald D. Anderson wrote: [snip] > > I guess your build with the "use flag" wasn't successful. I think you > have two choices: > > 1. really build with the patch installed, and dump your data using tha

Re: [GENERAL] Old problem needs solution

2005-06-03 Thread Russell Smith
merge -vp =postgresql-7.4.7-r2 Will do the job on gentoo. It's not enabled by default unless somebody has put pg-hier somewhere in the use flags. Regards Russell Smith >regards, tom lane > > ---(end of broadcast)--- > TIP

Re: [GENERAL] bulk loading of bplus index tree

2005-05-26 Thread Russell Smith
gt; tell in what cases can i make use of it. Bulk loading for B+Tree's in implemented in PostgreSQL. It is used on index creation, or reindex. I don't believe it's in other places, but Others may have more to say. Regards Russell Smith. > Thank You > Regards

Re: [GENERAL] (Ideas) pg_dump in a production environment

2005-05-24 Thread Russell Smith
If you have a long running transaction that blocks vacuum to certain small high update tables, you lose performance as the table bloats and can only fix it with a vacuum full. Both of these suggestions may be totally bogus. So I suppose I'm asking for feedback on them to see if they wou

Re: [GENERAL] pgplsh on postgresql 8.0.2

2005-05-13 Thread Russell Smith
or alternative? I have had an issue getting plsh working with 8.0.x Even after editing some of the source code. I contacted Peter E about it and he said he would like into it. I think you can run exec from both plperlu and plphpu. You may want to look into those to see if you can get what you wan

Re: [GENERAL] ORDER BY options (how to order data as AAA, aaa, BBB, bbb, ... ZZZ, zzz)

2005-05-10 Thread Russell Smith
On Tue, 10 May 2005 07:41 pm, Julian Legeny wrote: > Hello, > >I have following problem: > But I would like to sort all data as following: > >NAME > --- >AAA >aaa >BBB >bbb >CCC >ccc > > > How can I write sql command (or set up ORDER BY options) for sele

Re: [GENERAL] Samba server Error

2005-05-09 Thread Russell Smith
On Mon, 9 May 2005 08:09 pm, ElayaRaja S wrote: > Hi, Wrong Mailing list maybe? This is a PostgreSQL mailing list. Regards Russell Smith > I am using Redhat Linux 9 and I configure the samba server with > workgoup of my local > area network. when i tried to connect it was getti

Re: [GENERAL] plphp1.1 make fails

2005-05-06 Thread Russell Smith
On Fri, 6 May 2005 07:50 pm, CSN wrote: > I followed the new instructions (patch, autoconf, > configure --with-php=/usr/lib/apache/libphp5.so, etc.) > and get this error when running 'make': > > make[3]: Entering directory > `/usr/local/src/postgresql-8.0.2/src/pl/plphp' > patching file php.h It c

Re: [GENERAL] Can't compile plphp

2005-05-01 Thread Russell Smith
m correct for you. If you read the plphp mailing list, I have made a post about how to compile the new version. It includes my sample makefile, and the steps I went through. Regards Russell Smith > Thanks, > CSN > > > > ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] oid wraparound

2005-04-26 Thread Russell Smith
o make sure you do database wide vacuums every 1 billion transactions or so. If you do that, then there is not problem when the XID (Transaction ID) wraps around. Postgresql will know which transaction were in the past, and which were in the future. Regards Russell Smith.

Re: [GENERAL] pg_dump fails

2005-04-19 Thread Russell Smith
think may of the packagers are not tied to the projects they are packaging. But I also think there is often fault with the Gentoo user attempting to bleed his system a little too much for speed, without considering the stability or even understand it. Regards Russell Smith. > On Apr

Re: [GENERAL] [HACKERS] plPHP in core?

2005-04-05 Thread Russell Smith
upport Install postgresql with pl/php Rebuild php with postgresql support (Unless you only want it available in the db) I may be a bad man for suggesting it... But is it possible to ship libpq as a seperate tarball that you can compile without postgresql server? Regards Russell Smith ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Using sequence name depending on other column

2005-03-20 Thread Russell Smith
On Tue, 15 Mar 2005 08:39 pm, Andrus wrote: > >> > I have table containing different types of documents (type A, B and C). > >> > > >> > Each document type must have separate sequential ID starting at 1 > >> > > >> > ID of first inserted record of type A must be set to 1 > >> > ID of first inserted

Re: [GENERAL] Copression

2005-03-20 Thread Russell Smith
On Mon, 21 Mar 2005 02:50 pm, Bruce Momjian wrote: > Stanislaw Tristan wrote: > > It's a possible to compress traffic between server and client while server > > returns query result? > > It's a very actually for dial-up users. > > What is solution? There is always the possibility of using SSH to t

Re: [GENERAL] sql question

2005-03-13 Thread Russell Smith
On Fri, 11 Mar 2005 11:36 pm, Steven Verhoeven wrote: > Hi all > > My table definition : > >id | fref | mref > --+---+-- > 1 | 23| 25 > 2 | 24| 28 > 3 | 25| 31 > 4 | 26| 34 > > My problem : > i need a query that

Re: [GENERAL] Using sequence name depending on other column

2005-03-12 Thread Russell Smith
eave a whole in the numbers. You are probably best to no set a default value for an integer, or big integer. Then run a before trigger for each row. That trigger will assign a value to the column based on the value given for the type. Regards Russell Smith ---(end of

Re: [GENERAL] Problem with inherited table, can you help?...

2005-03-10 Thread Russell Smith
e there actually any problems with only getting a AccessShareLock? Regards Russell Smith ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Porting MySQL PHP to Postgres

2005-02-21 Thread Russell Smith
c code, or you are using some complicated classes to manage it, it may be harder to port. Unless the application is known, it difficult to give any real analysis on the difficulty of the task. Regards Russell Smith. > Thanks in advance. > > Kind Regards, > Shaun Clements &g

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2005-02-21 Thread Russell Smith
ARY=/usr/local/pgsql/lib ./sample Note there is no SPACE in the example I have given. LDLIBRARY=/usr/local... NOT LDLIBRARY = /usr/... Regards Russell Smith. > ________ > > From: Russell Smith [mailto:[EMAIL PROTECTED] > Sent: Mon 2/21/2005 2:19 PM >

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2005-02-21 Thread Russell Smith
: libpq.so.3: cannot open > shared object file: No such file or directory > Please tell what the problem is..and how should I rectify it? > Your library is in /usr/local/pgsql/lib this is obviously not in your ld.so.conf do you still experience problems when you run LDLIBRARY=/usr/lo

Re: [GENERAL] Website Documentation

2005-02-12 Thread Russell Smith
On Sun, 13 Feb 2005 01:45 pm, Tom Lane wrote: > Bruce Momjian writes: > > Russell Smith wrote: > >> The release notes for 8.0 and 7.4 only go to version 8.0.0 and 7.4.6. > > > If you want the changes to the server between releases see the Release > > notes in th

Re: [GENERAL] Website Documentation

2005-02-12 Thread Russell Smith
On Sun, 13 Feb 2005 01:22 pm, Bruce Momjian wrote: > Russell Smith wrote: > > Dear all, > > > > There does not seems to be the latest version of the PostgreSQL > > documentation online. > > > > The release notes for 8.0 and 7.4 only go to version 8.0.0 a

[GENERAL] Website Documentation

2005-02-12 Thread Russell Smith
Dear all, There does not seems to be the latest version of the PostgreSQL documentation online. The release notes for 8.0 and 7.4 only go to version 8.0.0 and 7.4.6. Where can I find the changes made from 7.4.6 -> 7.4.7, and 8.0.0 -> 8.0.1? Should the site be updates? Thanks Russell

Re: [GENERAL] Sorting when "*" is the initial character

2005-02-08 Thread Russell Smith
gt; > > I would expect to see > > > > account_id,account_name > > *115,Fifth account > > *125,Fourth account > > 100,First account > > 110,Second account > > 120,Third account With 8.0.0 C local, SQL_ASCII Database, I get the expected output. Regards Russell Smith ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Calculating a moving average (Coding style)

2005-01-24 Thread Russell Smith
a purist... > Given you have to define a function for each trigger, my view is why write more functions. Along with this. As a C programmer, I would do a few more IF tests in a function, rather than write another one. I find that triggers like this are one functional block and all

Re: [GENERAL] change natural column order

2004-11-30 Thread Russell Smith
d. Sorry if this comment is in the wrong place, I've been following the General and Hackers discussions and decided to post now after deleting the other posts. Regards Russell Smith. ---(end of broadcast)--- TIP 2: you can get off all lists at

Re: [GENERAL] OID's

2004-11-16 Thread Russell Smith
On Tue, 16 Nov 2004 08:01 pm, Joolz wrote: > Michael Glaesemann zei: > > > > OIDS are a system level implementation. They are no longer required > > (you can make tables without OIDS) and they may go away someday. > > Out of curiosiry: how will we handle blobs once the OID's are gone? > I would g

Re: [GENERAL] Error connecting using pgadmin from different computer !!

2004-11-10 Thread Russell Smith
On Thu, 11 Nov 2004 03:31 am, Goutam Paruchuri wrote: > Hello, > > I get an error in my log when connecting to postgres server on Windows. > Postgres version : 8.0.0-beta4 > > LOG TEXT > > 2004-11-10 11:22:47 LOG: invalid entry in file "C:/Program > Files/PostgreSQL/8.0.0-beta4/data/pg_hba.con

Re: [GENERAL] index not always used when selecting on a date field

2004-11-07 Thread Russell Smith
on that returns now. However if you PREPARE those queries, you will not get the new time for now() each time you run the query. This function fits in a category between STABLE and IMMUTABLE, of which there is currently no type. Regards Russell Smith ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Resource temporarily unavailable

2004-10-29 Thread Russell Smith
postgres user to 256 processes. So the kernel says out of process space for that user. Regards Russell Smith ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] adding missing FROM-clause

2004-10-29 Thread Russell Smith
On Sat, 30 Oct 2004 01:42 am, C G wrote: > Dear All, > > I have a simple join query > > SELECT c1 FROM t1 > INNER JOIN > t2 ON t2.c2 = t1.c2 WHERE t3.c3= t2.c3; > Instead SELECT c1 FROM t2, t1 INNER JOIN t2 ON t2.c2 = t1.c2 WHERE t3.c3=t2.c3 OR SELECT c1 FROM t1 INNER JOIN t2 ON t2.c2 = t1.c2

Re: [GENERAL] QMail

2004-10-29 Thread Russell Smith
On Thu, 28 Oct 2004 04:14 am, Eric wrote: > Is there something to interface postgreSQL with QMail to store mails in > pgsql instead of using mbox or maildir? > > Or maybe it's not a good idea to do that? > > I think there is some adavantages... also look at http://www.dbmail.org/ > > > >

Re: [GENERAL] Repeated VACUUM reports same number of deleted rows

2004-10-01 Thread Russell Smith
On Sat, 2 Oct 2004 12:42 am, Tom Lane wrote: > Russell Smith <[EMAIL PROTECTED]> writes: > > Should VACUUM report the rows as deleted or say they could not be deleted? > > Why does it report the same information for three runs in a row? > > I see no pending dele

[GENERAL] Repeated VACUUM reports same number of deleted rows

2004-10-01 Thread Russell Smith
: postgres sqlfilter 10.0.0.5 idle in transaction Should VACUUM report the rows as deleted or say they could not be deleted? Why does it report the same information for three runs in a row? Or is something else going on that I don't understand. Regards Russell Smith sqlfilter=# vacuum ve

Re: [GENERAL] Controlling order of evaluation?

2004-09-28 Thread Russell Smith
On Wed, 29 Sep 2004 08:16 am, Jerry LeVan wrote: > I have an srf sql function "annual_report()" that > as 14 columns, a category, 12 month numeric columns, and a total > numeric column. > > The function finds monthly totals for each category (which is the > target of "order by") > and the grand

Re: [GENERAL] Error Message Importing Into PostgreSQL (Using phpPgAdmin)

2004-08-31 Thread Russell Smith
arser: parse error at or near "\" at character 1 > Your query: > \connect - postgres > CREATE SEQUENCE "acls_bannerid_seq" start 1 increment 1 maxvalue 2147483647 > minvalue 1 cache 1 ; > This is designed to be sent to psql, which understands \connect. phpPgadmin does not.