[GENERAL] c function return not recognized?

1999-12-11 Thread Frank Miles
I've got an external C function that I call from a SELECT, for example: select * from table where cond1 and CFunction(columnName) 1.0; The 'CFunction' has been installed into Postgreql using CREATE FUNCTION, with a single 'text' argument, and returning a float8 (i.e. double). I can tell that

[GENERAL] mystery disease -- problems creating simple table[s]

2000-09-15 Thread Frank Miles
I have a small database which has been working fine. I just converted from 6.5.3 to 7.0.2 (Debian/Linux). Used pg_dumpall to restore the contents. What is strange now is that I can't create new tables without causing vacuum problems. For example: CREATE TABLE test_table ( test_id

[GENERAL] pqReadData() -- backend closed the channel unexpectedly (huh?)

2000-11-07 Thread Frank Miles
Hello all: I have a simple database which is now exhibiting some strange symptoms. The most obviously sick is where I try to delete a record in a table, and get the response: pqReadData() -- backend closed the channel unexpectedly. This probably means the backend

[GENERAL] newbie debugging pl/pgsql : better way?

2000-10-24 Thread Frank Miles
I have a simple function that isn't working. I've enabled debugging, but the error message is still mystifying. My function is as follows: CREATE FUNCTION proj_name(int) RETURNS char(7) AS ' DECLARE prn ALIAS FOR $1; prec

Re: [GENERAL] Users in pg_shadow

2001-03-01 Thread Frank Miles
One possible part of a cron script: su --command="psql -d $PGUSER -c 'vacuum analyze;' /dev/null" $PGUSER where 'PGUSER' has been defined as the appropriate user name. Of course, you'll need a bit more if your database has a different name. HTH... -frank

[GENERAL] LIKE erratic? or unseen DB corruption?

2001-05-21 Thread Frank Miles
Running 7.1(.0) on a PC running Debian Linux (potato), I have a strange situation in psql: A direct query gets appropriate rows of data: dbname=# select * from partdef where shpname = 'IDC16W'; pn_id | class | num | mt | ver | loc_id | unit_id | subptcnt | shpname | value|

[GENERAL] problem connecting from another host

2001-06-13 Thread Frank Miles
Running 7.1.2 on Debian Linux/potato (Intel): I'm trying to connect to the Postgresql database on machine P from machine A. I can, of course, use the 'fpm' database just fine from machine P. TCPIP has been turned on, along with debugging. The error log shows: No pg_hba.conf entry for

Re: [GENERAL] problem connecting from another host

2001-06-13 Thread Frank Miles
On Wed, 13 Jun 2001, Tom Lane wrote: Frank Miles [EMAIL PROTECTED] writes: The error log shows: No pg_hba.conf entry for host abc.de.fg.hij, user fpm, database fpm while in the pg_hba.conf I have an entry: hostfpm abc.de.fg.hij 255.255.255.255 trust

Re: [GENERAL] problem connecting from another host

2001-06-13 Thread Frank Miles
On Thu, 14 Jun 2001, Tom Lane wrote: Frank Miles [EMAIL PROTECTED] writes: The only thing I can imagine might be the problem is that client system doesn't have postgres loaded. You don't need the server loaded, only the client libraries. If you are getting as far as to contact

[GENERAL] workaround for pl/pgsql (no arrays, no temp tables)?

2001-08-28 Thread Frank Miles
I have an application includes data which describe tree-like structures of varying width and breadth. It is important for me to be able to recover the node-IDs for these data trees. The goal is to be able to recover the tree node ID list given the root node ID: Essentially, the tables are of

[GENERAL] recursive text construction in plpgsql?

2001-09-07 Thread Frank Miles
The simple recursive function: -- DROP FUNCTION testRecurse(int,int); CREATE FUNCTION testRecurse(int,int) RETURNS text AS ' DECLARE rslttext; BEGIN IF $1 = 0 THEN rslt= CAST($2 AS TEXT);

Re: [GENERAL] A creepy story about dates. How to prevent it?

2003-06-19 Thread Frank Miles
On Thu, 19 Jun 2003, Bruno Wolff III wrote: On Thu, Jun 19, 2003 at 02:43:12 -0500, Ron Johnson [EMAIL PROTECTED] wrote: OTOH, Andrew Snow's method (alway use ANSI standard -MM-DD) is guaranteed to work. Have your app convert to that format before inserting, and then PostgreSQL

Re: [GENERAL] What causes lock??

2005-08-04 Thread Frank Miles
On Thu, 4 Aug 2005, Michael Fuhr wrote: On Thu, Aug 04, 2005 at 03:03:47PM -0700, Frank Miles wrote: I have a python-based application which provides a user interface to a Postgresql database. The latest version of the application suddenly lost the inability to insert new data in some

Re: [GENERAL] What causes lock??

2005-08-05 Thread Frank Miles
Following up on my question regarding locking... Well... I'm less and less inclined to think that the update/insert failure is due to a lock problem. Weird! Perhaps the python/psycopg interface? I've never had a case where the python/psycopg invocation worked differently than with the psql

Re: [GENERAL] open source - content management system - that uses PostGreSQL

2007-02-20 Thread Frank Miles
One nice CMS package -- it doesn't force you to use Postgresql, but that is (IIRC) the default -- and python: http://www.djangoproject.com/ HTH-- -frank ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] pg_dump shell script with ~/.pgpass

2005-01-27 Thread Frank Miles
On Thu, 27 Jan 2005, Richard Huxton wrote: [EMAIL PROTECTED] wrote: [snip] I need to create a shell script for cron.daily to run that will do pg_dump for my database. I am using Redhat 9 and Postgresql v7.3.4. Currently when I run the dump manually the command I use is #pg_dump -u -C -D -f

[GENERAL] Exception messages - application?

2008-04-04 Thread Frank Miles
First of all, many thanks to all the developers for creating such a great DB. I have a moderately DB-ignorant question: is there a built-in way for an application to receive the message emitted by a RAISE in a PgSQL function? Context: I have a moderately complex application (in python,

Re: [GENERAL] Exception messages - application?

2008-04-05 Thread Frank Miles
On Fri, Apr 04, 2008 at 12:02:20PM -0700, Frank Miles wrote: I have a moderately DB-ignorant question: is there a built-in way for an application to receive the message emitted by a RAISE in a PgSQL function? Context: I have a moderately complex application (in python, using psycopg2

[GENERAL] set returning function with variable argument - possible?

2011-06-16 Thread Frank Miles
I have a function that returns a set of a defined type, something like: CREATE OR REPLACE FUNCTION f(arg) RETURNS SETOF return_type AS $$ ... $$ LANGUAGE 'plpgsql' STABLE with (isstrict); Ordinarily this function is called: SELECT * FROM f(constant);

Re: [GENERAL] set returning function with variable argument - possible?

2011-06-18 Thread Frank Miles
On Thu, 16 Jun 2011, David Johnston wrote: The only way to feed another relation into a function is to place the function in the SELECT list. If you then want to expand the result of the function call you alias the function result and then .* against it. WITH feeder AS ( SELECT f(var) AS

[GENERAL] cannot delete some records [9.3]

2013-12-05 Thread Frank Miles
I'm in the process of moving from a server running postgresql-8.4 (Debian-oldstable) to a newer machine running postgresql-9.3. The dumpall-restore process seemed to go perfectly. In running my self-test script, I discovered that one of the tables couldn't be cleared of some unit-test

Re: [GENERAL] cannot delete some records [9.3]

2013-12-05 Thread Frank Miles
On Thu, 5 Dec 2013, Andy Colson wrote: On 12/5/2013 4:05 PM, Frank Miles wrote: [snip] Table public.credmisc Column | Type |Modifiers

Re: [GENERAL] cannot delete some records [9.3]

2013-12-05 Thread Frank Miles
On Thu, 5 Dec 2013, Andy Colson wrote: On 12/5/2013 4:05 PM, Frank Miles wrote: The table schema is {\d credmisc}: And this is all owned by: {\dp credmisc} You have a table credmisc, in schema credmisc, owned by credmisc? It could be a path problem. Maybe trigger should be: Sorry

Re: [GENERAL] cannot delete some records [9.3] - semi-resolved

2013-12-10 Thread Frank Miles
I have a workaround for the mysterious inability to delete records from one particular table not notably different from many others. This does not explain the problem, but at least enables me to move on... Whether all of the following steps are necessary I can't say. Instead of loading the 9.3