Re: [GENERAL] Let's Do the CoC Right

2016-01-22 Thread Oliver Elphick
(Replying to the digest post) Having watched this discussion from the start, I think the project would be better off without any CoC.  The list has always been conducted well and if something isn't broken you shouldn't try to fix it. -- Oliver Elphick Lincolnshire, England -- Sent via pgsql

[GENERAL] Nested window functions not permitted

2015-11-08 Thread Oliver Elphick
I tried to do this: SELECT p.company, p.start, p.yearend, p.idnum, s.pdno, s.pdend, CASE WHEN nth_value(s.pdend,(row_number() OVER w)::INTEGER -1) OVER w IS NULL THEN p.start ELSE nth_value(s.pdend,(row_number() OVER w)::INTEGER -1) + '1

Re: [GENERAL] Nested window functions not permitted

2015-11-08 Thread Oliver Elphick
On Sun, 2015-11-08 at 17:50 -0500, Tom Lane wrote: > Oliver Elphick <o...@lfix.co.uk> writes: > > I tried to do this: > > SELECT p.company, p.start, p.yearend, p.idnum, > >s.pdno, s.pdend, > >CASE WHEN nth_value(s.pdend,(row_number()

Re: [GENERAL] localtime ?

2015-06-15 Thread Oliver Elphick
On 15/06/15 20:44, James Cloos wrote: AK == Adrian Klaver adrian.kla...@aklaver.com writes: AK So what is at line 508 in /etc/postgresql/9.3/main/postgresql.conf? timezone = 'localtime' That is the same in the 9.4 conf, where everything defaults to utc as I desire. Those are Debian's

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using COPY

2015-05-24 Thread Oliver Elphick
ideas you guys have on this task, please share. Assuming you are using Unix, or can install Unix tools, run the input files through sort -u before passing them to COPY. Oliver Elphick -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] How to skip duplicate records while copying from CSV to table in Postgresql using COPY

2015-05-24 Thread Oliver Elphick
On Sun, 2015-05-24 at 18:25 +0630, Arup Rakshit wrote: Assuming you are using Unix, or can install Unix tools, run the input files through sort -u before passing them to COPY. Oliver Elphick I think I need to ask more specific way. I have a table say `table1`, where

Re: [GENERAL] noobie join question

2015-05-11 Thread Oliver Elphick
On Mon, 2015-05-11 at 06:46 -0400, Steve Clark wrote: Hi List, I am having trouble trying to figure out how to get the result listed at the bottom. I have 3 tables units, types of units which has a description of the units, and a table that list associations of the units. I can't figure out

Re: [GENERAL] Collation problem?

2015-04-26 Thread Oliver Elphick
[ COLUMN ] column_name [ SET DATA ] TYPE data_type [ COLLATE collation ] [ USING expression ] You need to add the TYPE key word, I think. Oliver Elphick -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Collation problem?

2015-04-26 Thread Oliver Elphick
On Sun, 2015-04-26 at 12:39 +0200, Bjørn T Johansen wrote: CREATE COLLATION nb_NO (LOCALE = nb_NO.utf8) But then I get this: ERROR: could not create locale nb_no.utf8: No such file or directory DETAIL: The operating system could not find any locale data for the locale name

Re: [GENERAL] Postgres won't start

2013-08-09 Thread Oliver Elphick
On 9 August 2013 02:49, Tom Lane t...@sss.pgh.pa.us wrote: I wonder whether we shouldn't change the syslogger to emit something to stderr when it takes over logging, saying logging is now redirected to someplace. Shouldn't you also, or instead, log to stderr just before leaving it, in case

[GENERAL] Postgres won't start

2013-08-08 Thread Oliver Elphick
Linux Mint (from Ubuntu) version 9.1. Postgres will no longer start, but I cannot find out why. Command line: $ /usr/lib/postgresql/9.1/bin/pg_ctl start -D /home/postgresql/9.1/main -l /var/log/postgresql/postgresql-9.1-main.log -s -w -o '-c config_file=/etc/postgresql/9.1/main/postgresql.conf'

Re: [GENERAL] Postgres won't start

2013-08-08 Thread Oliver Elphick
the configuration files - that is not mentioned in the log. There is no other instance of postgres running. On 9 August 2013 00:59, Oliver Elphick o...@lfix.co.uk wrote: To start with, it worked but the pg_hba.conf entry appeared to be wrong. I tried changing that and then the current problem started. I

Re: [GENERAL] Inheritance and shared sequence

2007-06-07 Thread Oliver Elphick
), but it won't stop you manually supplying your own values. If you must keep the primary key unique across a set of tables, you need to create another table to index the keys and record which table each key is in. Use triggers to keep the index table up to date. -- Oliver Elphick

Re: [GENERAL] Suppress checking of chmod 700 on data-dir?

2007-06-07 Thread Oliver Elphick
to go. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA Do you

Re: [GENERAL] Running v8.1 amd v8.2 at the same time for a transition

2007-06-06 Thread Oliver Elphick
on) or unless the system is hosting multiple separate databases; in the latter case I imagine that most users are either guided by scripts or confined by an application program to a single database. Any suggestions for improvement? -- Oliver Elphick [EMAIL

Re: [GENERAL] Running v8.1 amd v8.2 at the same time for a transition

2007-06-06 Thread Oliver Elphick
On Wed, 2007-06-06 at 14:11 +0200, Vincenzo Romano wrote: On Wednesday 06 June 2007 13:41:12 Oliver Elphick wrote: Any suggestions for improvement? As far as running two or more versions of the PGSQL server in the same machine, I don't see solutions really different from the current one

Re: [GENERAL] Can someone have a look at my pg_hba.conf file ?

2007-06-05 Thread Oliver Elphick
: explain analyze is your friend -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] Foreign keys and indexes

2007-06-05 Thread Oliver Elphick
On Tue, 2007-06-05 at 17:07 +0200, Marc Compte wrote: For instance, in the implementation of a N:M relationship, declaring the primary as (foreign1, foreign2) will create two indexes? or just one? Just one -- Oliver Elphick [EMAIL PROTECTED] Isle

Re: [GENERAL] Running v8.1 amd v8.2 at the same time for a transition

2007-06-05 Thread Oliver Elphick
with no answer in 14+ hours. Is there anyone with a good hint? man pg_wrapper psql --cluster 8.1/main -d your_database -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-31 Thread Oliver Elphick
on 127.0.0.1. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA Do you

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
: missing or erroneous pg_hba.conf file if you try to connect from psql. I don't know if the Java stuff somehow manages to bypass it or if you haven't done a kill -SIGHUP of the postmaster to reload the configuration. -- Oliver Elphick [EMAIL PROTECTED

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
if you change host to hostnossl in pg_hba.conf? (Seeing that that error message specifies that SSL is off.) Please remember to SIGHUP or restart the postmaster after changing it. Again, which version of PostgreSQL is this? Oliver Elphick wrote: On Wed, 2007-05-30 at 12:11 -0400

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
the first host line should be used and the second one for user brakesh is redundant, since it comes later in the file. The only thing I can see is that it might be related to SSL. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight

[GENERAL] Problem - any password accepted

2007-05-30 Thread Oliver Elphick
FATAL: password authentication failed for user olly but it has still let me in. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543

Re: [GENERAL] jdbc pg_hba.conf error

2007-05-30 Thread Oliver Elphick
, Oliver Elphick wrote: On Wed, 2007-05-30 at 18:35 +0200, Martijn van Oosterhout wrote: On Wed, May 30, 2007 at 12:30:38PM -0400, Bhavana.Rakesh wrote: Oliver, When I do a : psql -p 5000 testing123 I can make a connection. However, when I do a psql -U

Re: [GENERAL] Problem - any password accepted

2007-05-30 Thread Oliver Elphick
On Wed, 2007-05-30 at 19:38 +0200, Martijn van Oosterhout wrote: On Wed, May 30, 2007 at 05:58:24PM +0100, Oliver Elphick wrote: While experimenting just now, I seem to have found a weird problem with passwords, in that _anything_ I type in is accepted as a valid password. # TYPE

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-29 Thread Oliver Elphick
would always make the country code part of the primary key and not just an attribute. Again this saves your having to invent a new set of codes when one exists already. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http

Re: [GENERAL] postgres - oid question

2007-05-24 Thread Oliver Elphick
the config parameter default_with_oids to true. (It defaults to false from 8.1 onwards.) Oliver Elphick ---(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

Re: [GENERAL] sequence problem - many rows

2005-11-29 Thread Oliver Elphick
: duplicate key violates unique constraint cachedgroupmembers_pkey That was because the sequence was trying to reuse one of the 700,000 values you just loaded. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http

Re: [GENERAL] Can this pl/pgsql be simplified?

2005-11-28 Thread Oliver Elphick
NEW.active THEN 1 ELSE 0 END) where id=NEW.member_id; END IF; ELSIF OLD.active NEW.active then update members set items_approved=items_approved+(CASE WHEN NEW.active THEN 1 ELSE -1 END) where id=NEW.member_id; END IF; -- Oliver

Re: [GENERAL] Upgrading from 8.0 to 8.1 on Debian

2005-11-18 Thread Oliver Elphick
to destroy the old one. These commands have to be run as root; postgres does not have sufficient permissions to modify the configuration files. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D

Re: [GENERAL] Dumb Questions - upgrade notes?

2005-11-01 Thread Oliver Elphick
... The release notes are included in the manual for each new version. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] Linking

2005-11-01 Thread Oliver Elphick
can be deleted, you probably need to specify ON DELETE CASCADE. Maybe too you want to add a reverse foreign key on process.fluid_id; if so it would have to be DEFERRABLE, so that the trigger could insert the records without causing errors. -- Oliver Elphick

Re: [GENERAL] function DECODE and triggers

2005-10-26 Thread Oliver Elphick
On Tue, 2005-10-25 at 18:31 +0200, Rafael Montoya wrote: Thanks for your answer, and if i have many options like decode (pre.C_EST,'01','U','02','M','03','W','04','D','05','O','06','S','') as Est do i have to write many else options in this way? select case when pre.C_EST = '01' THEN

Re: [GENERAL] function DECODE and triggers

2005-10-25 Thread Oliver Elphick
). -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA Do you want to know

Re: [GENERAL] pl/pgsql help

2005-10-25 Thread Oliver Elphick
be appreciated. CREATE LANGUAGE plpgsql; If you do that in the template1 database, every database created thereafter will have it installed from scratch. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk

Re: [GENERAL] newbie question: reading sql commands from script

2005-10-25 Thread Oliver Elphick
filename (the former gives line numbers), or for a single command: psql -c sql command -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664

Re: [GENERAL] Why different execution times for different instances for the

2005-10-25 Thread Oliver Elphick
and how do you resolved it. Thank you, Kishore. No, I haven't seen anything like that. I am forwarding this mail to the general enquiries list, in case anyone else can help. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http

Re: [GENERAL] Newbie Questions

2005-10-24 Thread Oliver Elphick
the postgres username; you can set up your own username as a PostgreSQL superuser and then you can do anything that postgres can do (except access the Unix files from outside a database connection). -- Oliver Elphick olly@lfix.co.uk Isle of Wight

Re: [GENERAL] supports de cours

2005-10-19 Thread Oliver Elphick
it you would have to search for the original Berkeley research papers. PostgreSQL uses standard SQL with a few extensions. See http://www.postgresql.org/docs/ -- Oliver Elphick olly@lfix.co.uk Isle of Wight http

Re: [pgsql-advocacy] [GENERAL] Oracle buys Innobase

2005-10-19 Thread Oliver Elphick
without the server would be those with multiple machines communicating with a server and a number of those might install the server by mistake. The ratio of nearly 6 to 4 seems quite reasonable. -- Oliver Elphick olly@lfix.co.uk Isle of Wight

Re: [GENERAL] update trigger not working

2005-10-19 Thread Oliver Elphick
ON table1 FOR and make this a BEFORE trigger EACH ROW EXECUTE PROCEDURE update_ts(); -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543

Re: [GENERAL] License question[VASCL:A1077160A86]

2005-10-12 Thread Oliver Elphick
packages is found in /usr/share/doc/package/copyright -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] strange error

2005-10-11 Thread Oliver Elphick
in a session or only on the second and subsequent executions? If the latter, try using EXECUTE in the function, so that the statement is reevaluated each time. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk

Re: [GENERAL] brain-teaser with CONSTRAINT - any SQL experts?

2005-10-09 Thread Oliver Elphick
a separate table with the two columns name and isbn which are that table's primary key; on the main table, create a foreign key to the new table. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG

Re: [GENERAL] 8.1beta1 RPMs

2005-08-30 Thread Oliver Elphick
hope these RPMs will help more people to test this new great release of PostgreSQL. Martin Pitt has loaded Debian packages for postgresql-8.1 into the Debian experimental archive. -- Oliver Elphick olly@lfix.co.uk Isle of Wight

Re: [GENERAL] selecting rows older than X, ensuring index is used

2005-08-20 Thread Oliver Elphick
this query so the index is used? The estimate is that nearly half of those 550 rows will be returned, so a sequential scan would probably be chosen in any case. -- Oliver Elphick olly@lfix.co.uk Isle of Wight http://www.lfix.co.uk

Re: [GENERAL] How to determine table schema in trigger function

2005-08-18 Thread Oliver Elphick
On Thu, 2005-08-18 at 17:02 +0300, Andrus wrote: I created generic (for tables in different schemas) trigger function : CREATE OR REPLACE FUNCTION setlastchange() RETURNS trigger AS $$BEGIN UPDATE serverti SET lastchange='now' WHERE tablename=TG_RELNAME and schemaname=TG_SCHEMA;

Re: [GENERAL] making another super user other than postgres

2004-11-12 Thread Oliver Elphick
. Oliver Elphick Debian maintainer for PostgreSQL ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] I have had enough

2004-11-10 Thread Oliver Elphick
checking to guard against forged sender addresses? -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

[GENERAL] Ping Mike Cox

2004-11-10 Thread Oliver Elphick
Hey Mike Cocks!!! Kiss my bullocks you bloody wanker! Go bugger off and take your yank arse to Burger King, you uncultured American cretin. Twits like you make me proud to be a Brit. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight

Re: [GENERAL] I'm about to release the next postgresql RFD.

2004-11-10 Thread Oliver Elphick
-performance gets a lot of posts and is probably relevant to nearly all users. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] server auto-restarts and ipcs

2004-11-09 Thread Oliver Elphick
should see the PostgreQSL shared memory segment and semaphores. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] server auto-restarts and ipcs

2004-11-09 Thread Oliver Elphick
On Tue, 2004-11-09 at 07:00 -0700, Ed L. wrote: On Tuesday November 9 2004 2:16, Oliver Elphick wrote: On Mon, 2004-11-08 at 17:47 -0700, Ed L. wrote: I often wonder why ipcs never seems to show the shared memory block in question? The permissions of the shared memory block

Re: [GENERAL] Conactenating text with null values

2004-11-05 Thread Oliver Elphick
On Fri, 2004-11-05 at 09:25, Gregory S. Williamson wrote: This is postgres 7.4 on a linux box ... I have driven myself to distraction trying to what ought to be easy. I have a table with house number, street direction, street name and street suffix as 4 columns. I want to paste them

Re: [GENERAL]: Unable to load libsqlpg.so

2004-11-03 Thread Oliver Elphick
for PostgreSQL 7.4. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA Lo

Re: [GENERAL] export-import problem

2004-10-31 Thread Oliver Elphick
doing? -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] Newbie question about escaping in a function

2004-10-26 Thread Oliver Elphick
:= COALESCE($1, NOW()); cmd := ''SELECT '' || quote_literal(tdat) || ''::TIMESTAMP + INTERVAL '' || quote_literal($2 || '' '' || $3) || '' AS x''; FOR result IN EXECUTE cmd LOOP return result.x; END LOOP; END; ' LANGUAGE 'plpgsql' VOLATILE; -- Oliver Elphick

Re: [GENERAL] basic debugging question

2004-10-26 Thread Oliver Elphick
1 to see what pgres is thinking about? Try SELECT * FROM tablename WHERE oid = 18015; If that returns nothing, the row must have been added to some other table, which would imply the existence of another table with a compatible structure. -- Oliver Elphick

Re: [GENERAL] how to port Oracle database to PostgreSQL?

2004-10-25 Thread Oliver Elphick
the source). -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] ON DELETE trigger blocks delete from my table

2004-10-25 Thread Oliver Elphick
On Mon, 2004-10-25 at 15:09 -0500, Naeem Bari wrote: Ok, a really newbie question - I think I will switch to using after rather than before - but can I modify the trigger statement without dropping the trigger function? CREATE OR REPLACE FUNCTION ... -- Oliver Elphick

Re: [GENERAL] Slony-I 1.0.4 Released

2004-10-23 Thread Oliver Elphick
package to provide just those and make that one a Build-dependency for the Slony-I package. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664

Re: [GENERAL] OID's

2004-10-23 Thread Oliver Elphick
. nextval() is guaranteed never to give the same number (unless setval() were used to reset the sequence value). A lot of people seem not to understand that. The trade-off is that sequences are not rolled back if a transaction is aborted. -- Oliver Elphick

Re: [GENERAL] Postgresql and scripting

2004-09-08 Thread Oliver Elphick
a b l e $ echo '- - C r e a t e C u s t o m e r s t a b l e' | sed -e 's/\([^ ]\) \([^ ]\)/\1\2/g' -e 's/\([^ ]\) \([^ ]\)/\1\2/g' -e 's/ */ /g' -- Create Customers table -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight

Re: [GENERAL] Function caches wrong OID of temporary table?

2004-09-08 Thread Oliver Elphick
, but has not noticed that the table has been dropped and recreated before the second invokation of the function. That is correct. You need to EXECUTE the command instead, so that it is planned afresh each time it is used. -- Oliver Elphick [EMAIL PROTECTED

Re: [GENERAL] Heritage

2004-09-08 Thread Oliver Elphick
to the hierarchy and use it as the target for foreign key references. Use triggers to keep it up to date. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631

Re: [GENERAL] restricting non superuser from accessing other

2004-09-07 Thread Oliver Elphick
On Tue, 2004-09-07 at 15:38, Tom Lane wrote: Oliver Elphick [EMAIL PROTECTED] writes: On Tue, 2004-09-07 at 14:35, David Garamond wrote: Thanks! So I must modify and kill -HUP postmaster everytime a new db is added. Is there something like this in pg_hba.conf? local owndb all md5

Re: [GENERAL] DROP TRIGGER permission

2004-09-06 Thread Oliver Elphick
and call it from inside your plpgsql function. The second function should be created by the user that owns the table and should be created with the SECURITY DEFINER option so that it will run with the permissions of the user that created it rather than those of the user invoking it. -- Oliver

[GENERAL] pg_autovacuum (7.4) nss_ldap oddity

2004-09-01 Thread Oliver Elphick
specifies ldap; what I don't understand yet is what pg_autovacuum is doing differently from every other application so as to cause this message. Oliver Elphick ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan

Re: [GENERAL] Primary key inheritance problem

2004-08-29 Thread Oliver Elphick
its own primary key on the referencing field. Use triggers to update the index table. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F

Re: [GENERAL] Primary key inheritance problem

2004-08-29 Thread Oliver Elphick
On Sun, 2004-08-29 at 18:07, Matthew M Davis wrote: On Sunday 29 August at 12:34pm, Oliver Elphick had this to say: Primary and foreign key constraints are not inherited. This is a defect in the current system. It almost seems like a FEATURE to me, since it creates a different and easy

Re: [GENERAL] copy a database

2004-08-25 Thread Oliver Elphick
to pg_class in the corrupted database. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] copy a database

2004-08-25 Thread Oliver Elphick
On Wed, 2004-08-25 at 17:09, Alvaro Herrera wrote: On Wed, Aug 25, 2004 at 04:25:02PM +0100, Oliver Elphick wrote: Maybe recreating pg_user in the database will help. It is a global table, so if you have other databases where pg_user exists, copy the row from pg_class in that database

Re: [GENERAL] Dump and Restore

2004-08-24 Thread Oliver Elphick
On Tue, 2004-08-24 at 17:36, Eduardo S. Fontanetti wrote: I am using pg_dump. It means that I can't restore to a different name database?? If you use pg_dump[all] without other options it will dump to a text file. Just edit the database name. -- Oliver Elphick

Re: [GENERAL] SELECT to an external file

2004-08-24 Thread Oliver Elphick
On Tue, 2004-08-24 at 18:08, Mário Gamito wrote: Hi, How can i draw the results of a SELECT in to a file in the filesystem ? Using psql: 1. \o /path/to/file SELECT ... ; \o 2. psql -d my_database -c SELECT ... /path/to/file -- Oliver Elphick

Re: [GENERAL] problem with postgresql-dump while upgrading to 7.4

2004-08-20 Thread Oliver Elphick
should contain the new database, but apparnetly doesn't; db.out ought to be the dump as a text file. Take a look at the dump file, if it is there. Does it look complete? -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http

Re: [GENERAL] pg_dump feature request: Exclude tables?

2004-08-19 Thread Oliver Elphick
this is find; others that spring to mind are dpkg -l and mmv. Anyone who doesn't get it will very soon be educated; I don't see this issue as a reason not to use such wildcards. Oliver Elphick ---(end of broadcast)--- TIP 9: the planner will ignore your

Re: libpq: passwords WAS: [GENERAL] scripting psql issues

2004-08-19 Thread Oliver Elphick
one. Oliver Elphick ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] scripting psql issues

2004-08-19 Thread Oliver Elphick
On Wed, 2004-08-18 at 16:26, Bob Parkinson wrote: I've started to use the here document idea a lot when writing scripts to do tasks. #!/usr/local/bin/bash psql -d myDB EOSQL select foo update bar; delete from ... EOSQL If the here document is long and complicated, you should

Re: [GENERAL] Stored Procedures woes

2004-08-19 Thread Oliver Elphick
cost_bytes_in=costIn, cost_bytes_out=costOut WHERE user_id=userId AND session_id=us_rec.session_id; Are you somehow setting off an infinite recursion? How is this being called? Try putting RAISE NOTICE statements in to track the progress of the code. Oliver Elphick

Re: [GENERAL] trouble with query

2004-08-04 Thread Oliver Elphick
INTO form (human_subj, animal_subj, toxic,...) VALUES ('yes','yes','yes',...); This will continue to work even if the table's column order changes for some reason. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight

Re: [GENERAL] Using view

2004-07-30 Thread Oliver Elphick
On Fri, 2004-07-30 at 09:17, Secrétariat wrote: Hello ! Why can't I update data when I use a VIEW instead of a TABLE ? Because a view is not a table. Many views are inherently non-updatable, and the backend assumes that all are. How can I do similar action ? Create a rule on the view to

Re: [GENERAL] phppgadmin and external access

2004-07-24 Thread Oliver Elphick
a 403 Forbidden error. Do you know what is the solution? -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] pgadmin problem

2004-07-24 Thread Oliver Elphick
, but a Unix socket. Try psql -h localhost contacts to see the difference. Edit $PGDATA/pg_hba.conf to change the settings (and then signal the postmaster or restart it). -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http

Re: [GENERAL] sorting and spaces in postgresql with en_US locale

2004-07-21 Thread Oliver Elphick
and capitalisation are ignored. This is a glibc issue, not a PostgreSQL issue. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA

Re: [GENERAL] system catalog and varchar datatype

2004-07-19 Thread Oliver Elphick
give any information SELECT pg_catalog.format_type(a.atttypid, a.atttypmod) FROM pg_attribute AS a; would return character varying(10) or similar. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight http://www.lfix.co.uk/oliver

Re: [GENERAL] pgsql on debian

2004-06-27 Thread Oliver Elphick
. Sounds as if you created a database called 'root'. but now i cannot access the db. i get the follwing msgs psql: FATAL: database jaydb does not exist Use psql -l to list existing databases. -- Oliver Elphick [EMAIL PROTECTED] Isle of Wight

Re: [GENERAL] making a copy of a table within the same database

2004-03-03 Thread Oliver Elphick
on the fly (if the old table name doesn't occur except as a table name): pg_dump -d my_database -t old_table | sed -e 's/old_table/new_table/g' | psql -d my_database -- Oliver Elphick [EMAIL PROTECTED] LFIX Ltd ---(end of broadcast)--- TIP

Re: [GENERAL] DBs and Schemas

2004-01-06 Thread Oliver Elphick
= yourschema; at the beginning, then the rest of the application wouldn't need to change. That's what I did when I did something similar. You can use ALTER DATABASE to set that up permanently, without touching the application. -- Oliver Elphick[EMAIL PROTECTED] Isle

Re: [GENERAL] Date column that defaults to 'now'

2004-01-05 Thread Oliver Elphick
remain the same within a transaction even if the time or date changes, whereas timeofday() always returns the current clock time. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12

Re: [GENERAL] GetLastInsertID ?

2004-01-01 Thread Oliver Elphick
() to get an id to use in the insert. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

Re: [GENERAL] restoring database

2003-12-22 Thread Oliver Elphick
to be restored. If you dumped in tar or special format, I believe you can use pg_restore -d dbname but I haven't done that myself and am not sure if I'm interpreting the manpage correctly. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http

Re: [GENERAL] ERROR: JOIN/USING types 'integer' and 'character

2003-12-11 Thread Oliver Elphick
; but if it is intentional, cast one of them to match the other. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

Re: [GENERAL] user defined variable per session

2003-12-07 Thread Oliver Elphick
? -- 5 (1 row) But that is specific to psql. It's not something you can use in an application, as you might the Sybase command. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG

Re: [GENERAL] GRANT ON C

2003-12-07 Thread Oliver Elphick
is not the postgres super-user I get a permission denied, and couldn't find how to change that permission problem. I the postgres super-user the only one that can create functions with LANGUAGE C? Yes. Just think of all the things you can do in C with the backend's permissions. -- Oliver Elphick

Re: [GENERAL] Money data type in PostgreSQL?

2003-12-03 Thread Oliver Elphick
(e.g. converting IDR to USD) to 1E4 (e.g. converting IDR to pounds/euros). You should only use NUMERIC for money; any kind of floating point representation will lose detail somewhere along the line. (I suppose you could use BIGINT for Japanese Yen.) -- Oliver Elphick

Re: [GENERAL] PostgreSQL from a newcomers perspective

2003-12-01 Thread Oliver Elphick
/5432quot;? in /path_to/filename.php on line 61 That socket path is wrong. It should be /tmp/.s.PGSQL.5432. How is PHP getting it? -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12

Re: [GENERAL] PostgreSQL Advocacy, Thoughts and Comments

2003-11-29 Thread Oliver Elphick
( SELECT MIN(effectivedate) FROM t2 ); (select employees who were born after the longest-serving employee started work.) -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D

Re: [GENERAL] Cron-job for checking up on pg_autovacuum

2003-11-29 Thread Oliver Elphick
pg_autovacuum in the rc script if it is so configured. -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

Re: [GENERAL] Humor me: Postgresql vs. MySql (esp. licensing)

2003-11-29 Thread Oliver Elphick
. A licence is one-sided. (However, a licence may itself be the consideration, as when you pay for commercial software.) -- Oliver Elphick[EMAIL PROTECTED] Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5

  1   2   >