Re: [GENERAL] set-level update fails with unique constraint violation

2010-01-05 Thread Roman Neuhauser
); > > INSERT INTO x (i) VALUES (1), (2), (3); > > UPDATE x SET i = i + 1; > > > > are there any plans to make this work? > > Hi, > This seems to work.. > UPDATE x set i=i+1 > from (select i as m from x order by m desc) y where x.i = y.m > Jayadevan T

Re: [GENERAL] set-level update fails with unique constraint violation

2010-01-03 Thread Roman Neuhauser
# scott.marl...@gmail.com / 2010-01-02 11:23:24 -0700: > On Sat, Jan 2, 2010 at 1:40 AM, Roman Neuhauser wrote: > > # da...@fetter.org / 2009-12-31 08:04:58 -0800: > >> On Thu, Dec 31, 2009 at 10:52:20AM +0100, > >> neuhauser+pgsql-general#postgresql@sig

Re: [GENERAL] set-level update fails with unique constraint violation

2010-01-02 Thread Roman Neuhauser
RRABLE INITIALLY DEFERRED > ); > INSERT INTO x (i) VALUES (1), (2), (3); > UPDATE x SET i = i + 1; thanks, this might be a bearable workaround in some cases provided there's also SET CONSTRAINTS ... DEFERRED / IMMEDIATE. what I really want is a mode that fires the constraint check at the en

Re: [GENERAL] Emal reg expression

2009-10-28 Thread Roman Neuhauser
On Wed, Oct 28, 2009 at 05:45:14AM -0700, Xai wrote: > i want to create a type for an email field but i'm not good with regx > can some one help me? http://marc.info/?l=postgresql-general&m=112612299412819&w=2 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] recommendations for reducing mem usage on local dev machine

2007-04-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-04-14 13:27:33 +0200: > Hi, > I am stuck for the moment with 1gig of ram on a win xp machine running > a 8.2.3 postgres. With the java website taking 300meg, how is it going to scale? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man.

Re: [GENERAL] Stored procedure

2007-03-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-03-13 18:29:36 +0100: > Hi, > > I have a stored procedure which returns a SETOF RECORD. > so basically a partial rowtype from a table. > > to execute the query in PHP, i must write : > select * from myschema.sp_a_002('username') as result(Column1 varchar); > > to get t

Re: [GENERAL] Can you specify the pg_xlog location from a config file?

2007-01-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-26 09:21:27 -0800: > Windows doesn't support symlinks. Is it possible instead for there to > be a config file that lets one set where the pg_xlog directory will sit? Windows has junction points. -- How many Vietnam vets does it take to screw in a light bulb? You do

Re: [GENERAL] Installing PostgreSQL under Cpanel

2007-01-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-23 23:17:31 +0800: > >Please don't top-post, it disturbes the flow of the communication. > > Interesting. I prefer getting to the point an author is making. Top posting means you end up far off the mark. > >There's documentation about that too, at the end of the in

Re: [GENERAL] Dump all databases to corresponding files

2006-11-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-06 12:26:43 +0100: > On Sun, 05 Nov 2006, CSN wrote: > > > Anybody know of a script that dumps all databases into > > corresponding dump files > > I've written this one in bash: > > # > #!/bin/bash > > pg_dump

Re: [GENERAL] first steps in PhP and PostgreSQL

2006-11-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-11-06 15:05:25 +0100: > I'm sure that it's a typo or something, but as I'm getting into PhP > and PostgreSQL for the first time, I can't be sure. > pg_connect ("dbname=cdi user=cdi password=toto") or die > ("Couldn't Connect: ".pg_last_error()); > $query="SELECT

Re: [GENERAL] more anti-postgresql FUD

2006-10-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-10 14:16:19 -0400: > FUD from another open source project is really poor form, particulary > when not in competing segements where a little bit of competitive > rivalry is expected. OMG WTF what FUD??? # [EMAIL PROTECTED] / 2006-10-10 13:55:57 -0400: > http://www

Re: [GENERAL] Postgres Team: Thank You All

2006-09-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-09-20 21:59:10 -0400: > To all involved in this project, > > I justed wanted to let you know how impressed and pleased I have been > with postgres over the past 5 years . Remember, this is an opens source project. Satisfied users are similar to random victims i

Re: [GENERAL] vista

2006-09-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-09-19 21:26:16 +1000: > if you want to be taken seriously by anyone who uses Windows (hands up > anyone who knows a Windows user) 1. what do those two things have in common? 2. what makes you think that "anyone who uses Windows" runs PostgreSQL on it?

Re: [GENERAL] Create user or role from inside a function?

2006-09-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-09-01 20:13:14 +1000: > Hey, > > I am running PostgreSQL 8.1.4 and I want to create a user from inside a > function. Is this possible in 8.1? > > Ive found quite a few references on google using EXECUTE, but this seems > relevant to earlier versions, not 8.1. > > I hav

Re: [GENERAL] Trigger (Transaction related)

2006-09-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-09-01 03:19:03 -0400: > If that is the case then why does it throw error in one on the insert > queries in the shared object written in SPI without inserting the row on the > table on which record is inserted. > > Follwing query in the shared object throws an error. > >

Re: [GENERAL] UUID as primary key

2006-08-31 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-31 07:35:30 -0700: > > Ralf Engelschall's OSSP uuid looks very good. Written in C with > > interfaces into PostgreSQL, PHP and C++ (classes wrapping the C > > structures and functions). > > > > http://www.ossp.org/pkg/lib/uuid/ > > Can you give a link

Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-30 12:32:21 -0500: > There are good reasons why that is not a feature found in many popular > email clients. The biggest of which is that if it was people would use > it all the time and spammers would abuse it as a way to cull current > email addresses. IOW g

Re: [GENERAL] plz unsubscribe me

2006-08-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-30 14:11:11 -0400: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > So I don't think we should do anything about it. It's not really a > > serious problem. > > Actually, what I'd like to see done is to get majordomo to bounce list > messages containing "unsubscribe"

Re: [GENERAL] Fwd: How to convert a string to bytea?

2006-08-30 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-30 12:22:47 -0400: > -- Forwarded message -- > From: Chris Hoover <[EMAIL PROTECTED]> > Date: Aug 30, 2006 12:22 PM > Subject: How to convert a string to bytea? > To: "pgsql-admin@postgresql.org" > > I am in need of some help. I need to use the encod

Re: [GENERAL] UUID as primary key

2006-08-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-21 21:16:14 -0700: > I'm considering using a UUID as a primary / foreign key for my schema, > to help ensure portability of data in a multi-master context. Does > anyone have experience with this? > > There's a project on Gborg (pguuid) to create a "native" UUID ty

Re: [GENERAL] cannot open pg_database

2006-08-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-19 20:18:53 -0700: > Installing with yum, Fedora core 5. Get error: "could > not open file "global/pg_database": No such file or > directory." The file exists however, in > /var/lib/pgsql/data/global and contains 3 lines: > “postgres” 10793 1663 499 499 > “template”

Re: [GENERAL] select * from users where user_id NOT in (select

2006-08-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-18 10:00:20 +0200: > On 8/18/06, Stephan Szabo <[EMAIL PROTECTED]> wrote: > >When the subselect returns > >NULL for at least one row, you fall into this sort of case. > > > >x NOT IN (...) is equivalent to NOT(x IN (...)) which is > >NOT(x = ANY (...)) > > > >x = ANY (

Re: [GENERAL] Triggers invoking a stored procedure or a C function

2006-08-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-16 11:55:39 -0400: > Hi, > Conventionally a trigger would fire a few sql queries on a particular event > and we have standard code for that. > > My requirement is to start a stored procedure or a C function as a trigger > action. > > Is this possible? Besides th

Re: [GENERAL] Tuning to speed select

2006-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-11 10:12:40 -0400: > I think my Dell Precision 650 has SATA on the motherboard. The boss says > I can order one drive, so what should I get? How much faster is RAID 0+1 > than a single drive? You need 4 disks for 0+1 (or 1+0, also called 10). -- How many Viet

Re: [GENERAL] Restoring database from old DATA folder

2006-08-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-07 22:17:26 -0700: > > I have a DATA folder of my previous PostgreSQL 8.1 (Windows XP) installation. > I do not have any DUMP or other backups. I want to use this folder instead > of the newly created DATA folder after new installtion. > > I tried replacing the new f

Re: [GENERAL] Problem writing function

2006-08-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-06 11:47:43 +0200: > the following function is created properly: > CREATE OR REPLACE FUNCTION insert_into_table_overview(text, chr integer) > RETURNS void AS ' > DECLARE > in_tableALIAS FOR $1; > p RECORD; > BEGIN > RAISE NOTICE '

Re: [GENERAL]

2006-08-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-05 19:32:27 +0200: > I stop the postmaster service and then i copy the directory in an other place. > Restart the postmaster and then test someting modifications. > Then i stop the service and restore the saved data directory > Now the postmaster dont start any more >

Re: [GENERAL] proper use of array datatype

2006-08-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-02 10:49:01 -0700: > On 8/1/06, Reece Hart <[EMAIL PROTECTED]> wrote: > > > > Eric Andrews wrote: > >> I am not much of a schema designer and have a general questoin about > >> the proper use of the array datatype. In my example, I have > >> destinations, and destinati

Re: [GENERAL] LISTEN considered dangerous

2006-08-02 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-02 07:57:55 +0200: > I'm bothered by listen listening from the end of the transaction in > stead of the start of the transaction. Sorry if this isn't what you're after, instead just a question: Why don't you issue the LISTEN in a separate transaction before

Re: [GENERAL] money type depreciated?

2006-08-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-01 10:18:45 -0700: > I read in the documentation that the money type is depreciated. It > says to use the to_char function and NUMERIC/decimal instead. Why was > the money type depreciated when it was so useful? How would be the > best way to use to_char and numeri

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-08-01 02:35:48 -0400: > On 8/1/06, Roman Neuhauser <[EMAIL PROTECTED]> wrote: > > > ># [EMAIL PROTECTED] / 2006-07-31 11:58:49 -0400: > >> Actually Postgres manual of triggers says that in postgres, you can't > >write > >>

Re: [GENERAL] Triggers in Postgres

2006-08-01 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-07-31 11:58:49 -0400: > Actually Postgres manual of triggers says that in postgres, you can't write > a trigger in conventional sql. You have to write it in a procedural language > like C. So wanted some more insight on it. > ~Jas Where does it say so? Do you have a

Re: [GENERAL] Messages to pgsql-general list not being posted

2006-07-19 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-07-19 09:50:05 -0400: > Yesterday I sent two messages to pgsql-general@postgresql.org, and > neither one posted, as far as I can tell. > > "Please explain the gin index" - 7/18/06 10:44 AM EDT > > "number of distinct values in tsearch2 gist index" - 7/18/06 1:24 PM EDT

Re: [GENERAL] pgsql vs mysql

2006-07-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-07-11 12:04:07 -0400: > On 6/30/2006 1:07 PM, Merlin Moncure wrote: > > >* mysql has a few features here and there which are nice...just to > >name a few, flush tables with lock, multiple insert, etc (...) > The multiple insert stuff is not only non-standard, it al

Re: [GENERAL] Version/Change Management of functions?

2006-07-09 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-07-07 14:08:08 -0600: > --On July 7, 2006 12:35:53 PM +0000 Roman Neuhauser <[EMAIL PROTECTED]> > wrote: > > ># [EMAIL PROTECTED] / 2006-07-06 22:41:27 -0600: > >>OK I know this is an odd question but I'm working on an app that will

Re: [GENERAL] Version/Change Management of functions?

2006-07-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-07-06 22:41:27 -0600: > OK I know this is an odd question but I'm working on an app that will rely > more and more on database driven functions, and while the app's source is > in SVN, and I intend for the source of the SQL scripts to also be there, I > was wondering..

Re: [GENERAL] Why my cursor construction is so slow?

2006-07-07 Thread Roman Neuhauser
# kleptog@svana.org / 2006-06-22 09:19:44 +0200: > On Tue, Jun 20, 2006 at 02:06:19AM -0700, [EMAIL PROTECTED] wrote: > > Such construction is very slow but when I modify SQL to: > > OPEN cursor1 FOR SELECT * FROM alias WHERE mask>=alias_out > > ORDER BY mask LIMIT 100; > > > > it works ve

Re: [GENERAL] Fabian Pascal and RDBMS deficiencies in fully implementing

2006-06-09 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-06-09 10:12:21 +0200: > Agent M wrote: > > If you don't use NULL, then you don't > > come across 3-valued logic--problem solved. > > So was does "SELECT sum(1) FROM dual WHERE false" return? You stripped this: > > Some Tutorial D notions really make sense; I would

Re: [GENERAL] How to use index in case insensitive substing search

2006-06-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-06-06 11:58:26 +0300: > How to force postgres to use index for the following query (I can change the > query to equivalent if required) > > select nimi from klient where lower(nimi) like 'test%' do you have an index on klient (lower(nimi))? -- How many Vietnam ve

Re: [GENERAL] What is the point of create or replace view command

2006-06-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-06-05 16:19:19 +1000: > On 6/5/06, Joe Conway wrote: > >Chris Velevitch wrote: > >> But what about my original question? > >> > >> "What is the point of the create or replace view command if you > >> can't change the > >> column and data types?" > > > >-- create t

Re: [GENERAL] Querying for strings that match after prefix

2006-06-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-06-02 05:18:08 -0700: > I think I need to explain a bit further. > > I tried simply using > > update people > replace(address, 'mailto:',''); > > but unfortunately that produced a duplicate key error as some of the > addresses prefixed with 'mailto:' are already presen

Re: [GENERAL] DB structure for logically similar objects in different

2006-05-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-05-29 08:10:43 -0400: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2006-05-28 16:13:20 -0400: > > > >>Basically we've got several different "states" that an item can be in. > >>From what I've seen the way many pla

Re: [GENERAL] DB structure for logically similar objects in different states...

2006-05-29 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-05-28 16:13:20 -0400: > Basically we've got several different "states" that an item can be in. > From what I've seen the way many places seem to deal with them is > something along the lines of making bool values that act as > switches... > > Ex: > table items: > item_id

Re: [GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-03-01 Thread Roman Neuhauser
Let me start this email by saying thank you to whoever fixed the problem. I found a bunch of "Welcome to..." / "Results from delayed command" message pairs in my mail this morning, and a batch of messages from each of sql, performance, and hackers mailing lists. # [EMAIL PROTECTED]

Re: [GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-02-28 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-02-28 15:14:39 -: > It looks like the listserv cannot handle that address - it says: > > "Individual words are not allowed in an e-mail address without an > intervening period or at symbol ('.' or '@')." Which address? I see no whitespace in any of the addresse

Re: [GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-02-28 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-02-27 16:32:55 -0400: > On Mon, 27 Feb 2006, Roman Neuhauser wrote: > > ># [EMAIL PROTECTED] / 2006-02-26 19:01:58 -0400: > >>'k, I just checked all the lists you listed, and you are subscribed to > >>each of them ... are you not rec

Re: [GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-02-27 Thread Roman Neuhauser
gsql--owner@ and postmaster@ aliases? Does anyone pay attention to the approval queue? Anyway, here's a few snippets from my last year's email conversations with [EMAIL PROTECTED] My subscription requests: : Date: Sat, 24 Sep 2005 12:17:37 +0200 : From: Roman

Re: [GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-02-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-02-26 20:15:20 +0100: > # [EMAIL PROTECTED] / 2006-02-26 14:36:47 -0400: > > On Sun, 26 Feb 2006, Roman Neuhauser wrote: > > > > >Hello, > > > > > >I've been waiting five months for the majordomo moderators to a

Re: [GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-02-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-02-26 14:36:47 -0400: > On Sun, 26 Feb 2006, Roman Neuhauser wrote: > > >Hello, > > > >I've been waiting five months for the majordomo moderators to approve > >my subscription requests to several @postgresql.org mailing lists. > &g

[GENERAL] majordomo unmaintained, postmaster emails ignored?

2006-02-26 Thread Roman Neuhauser
Hello, I've been waiting five months for the majordomo moderators to approve my subscription requests to several @postgresql.org mailing lists. I sent an email to [EMAIL PROTECTED] more than two months ago, also without any reaction. What should I do to spark someone's interest? Pls cc me on re

[GENERAL] non-btree primary key

2006-02-25 Thread Roman Neuhauser
Hello, looks like PostgreSQL (8.0/8.1) has no support for using other-than-btree indexes for primary keys. Is there a (perhaps un(der)documented) way to specify the index type? Rationale: I'm trying to have PKs on a type that defines only the = and <> operators, and would work with a hash-based P

Re: [GENERAL] More efficient INs when comparing two columns

2005-09-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-20 20:45:21 +0200: > I was thinking if this was possible in some way.. > I have this table where we have X and Y coordinates, and i need to > select several in one go. > > # select * from xy where (x = 1 and y = 2) or (x = 2 and y = 2); > > This works but are not so

Re: [GENERAL] "Unsubcribe"

2005-09-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-13 18:28:07 -0700: > Please...help me.. > How to unsubcribe Look at the headers of any message posted to the list. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http

Re: [GENERAL] arrays, composite types

2005-09-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-11 12:11:39 -0400: > Roman Neuhauser <[EMAIL PROTECTED]> writes: > > > I'm looking for an equivalent of my_composite_type[] for use as a > > parameter of a pl/pgsql function. What do people use to dodge this > > limitation? > &

[GENERAL] arrays, composite types

2005-09-11 Thread Roman Neuhauser
I'm looking for an equivalent of my_composite_type[] for use as a parameter of a pl/pgsql function. What do people use to dodge this limitation? Background: I have a few plpgsql functions that basically accept an array of objects decomposed into arrays of the objects' attributes: CREATE FUNCTION

Re: [GENERAL] constraints on composite types

2005-09-09 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-09 09:10:30 -0600: > On Fri, Sep 09, 2005 at 10:39:58AM -0400, Tom Lane wrote: > > I don't believe you need the function -- this should be enough: > > > > CREATE UNIQUE INDEX t1_b_uniq ON t1 ((attr.foo)); > > I was expecting that to work too, but it doesn't: > > ERR

[GENERAL] constraints on composite types

2005-09-09 Thread Roman Neuhauser
This fails on 8.0.3 (syntax error at or near "." at character): CREATE TYPE ct AS ( foo INTEGER, bar INTEGER ); CREATE TABLE t1 ( attr ct, CONSTRAINT uq UNIQUE (attr.foo) ); Should it be possible? From reading http://www.postgresql.org/docs/current/static/rowtypes.html it looks like almo

Re: [GENERAL] Acting on dropped/timed-out connections

2005-09-08 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-08 11:31:25 +0300: > We have a daemon programme that acts as a pgsql client. It writes in a > DB the status of its own clients. And we have a different daemon that > needs to read that status information and decide upon it. The problem > is that the first daemon is a l

Re: [GENERAL] Email Verfication Regular Expression

2005-09-07 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-07 11:17:10 -0400: > Does anybody have regular expression handy to verfiy email addresses? This is what I have. The comment notes the caveats. -- CREATE FUNCTION IS_EMAILADDRESS {{{ -- returns TRUE if $1 matches the rules for RFC2822 addr-spec token, -- ignoring

Re: [GENERAL] How to write jobs in postgresql

2005-09-06 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-15 20:25:20 -0500: > On Tue, Aug 09, 2005 at 03:26:27PM -0500, Guy Rouillier wrote: > > chiranjeevi.i wrote: > > > Hi Team Members, > > > > > > Is it possible to write jobs in postgresql & if possible how > > > should I write .please help me. > > > > See pgjob i

Re: [GENERAL] SLOOOOOOOW

2005-09-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-09-05 09:39:47 +0200: > I working now for a wile with postgres (7.4), and I have the impression > that is one of the slowest dbms with which I've aver worked. Can please > somebody explain to me, why this is the case? Because the default configuration (is | seems to

Re: [GENERAL] How do I copy part of table from db1 to db2 (and rename the columns)?

2005-08-31 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-31 12:00:30 +0200: > I want to copy several columns of a source table from db1 to db2, and > create the target table and rename the columns in the process. > > Is that possible in PostgresQL? If so, an example or url for such a > command /script would be appreciated.

Re: [GENERAL] OTICE: adding missing FROM-clause entry for table

2005-08-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-12 10:17:50 +0200: > I just experienced some bad SQL causing quite unexpected results. > > I used a statement like this: > SELECT t1.a, t1.b, t2.d FROM test1 t1, test2 t2 WHERE t1.a = test2.a; > > Where I should have used this instead: > SELECT t1.a, t1.b, t2.d FROM

Re: [GENERAL] plphp: PHP Warning: Call-time pass-by-reference has been deprecated

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 17:36:49 -0700: > --- Roman Neuhauser <[EMAIL PROTECTED]> wrote: > > Can you post the code that triggers the warning? > > Sure- > > > CREATE or REPLACE FUNCTION email_activated_member () > RETURNS trigger AS $$ >

Re: [GENERAL] plphp: PHP Warning: Call-time pass-by-reference has been deprecated

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 16:49:25 -0700: > I'm using PHP5, and I'm not passing by reference. My > first stop WAS plphp.commandprompt.com, but none of > their mailing list links for plphp work. Can you post the code that triggers the warning? -- How many Vietnam vets does it take to s

Re: [GENERAL] Long running update

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 16:17:09 -0700: > Hello, > I currently running an update statement that updates every row in a > very large table. This query will obviously take a long time to run. > My question -- is there any way to know how much time it will take > once it starts? Even someth

Re: [GENERAL] plphp: PHP Warning: Call-time pass-by-reference has been deprecated

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 15:45:18 -0700: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2005-08-11 13:23:52 -0700: > > > >>I'm getting this warning in pgsql's log: > >> > >>LOG: plphp: PHP Warning: Call-time pass-by-reference >

Re: [GENERAL] plphp: PHP Warning: Call-time pass-by-reference has been deprecated

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 13:23:52 -0700: > I'm getting this warning in pgsql's log: > > LOG: plphp: PHP Warning: Call-time pass-by-reference > has been deprecated - argument passed by value; If > you would like to pass it by reference, modify the > declaration of [runtime function name]

Re: [GENERAL] regarding isolation between threads

2005-08-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-11 16:04:00 +0530: > void *connect(void* threadid) > { > char command[100]; > int *id_ptr, taskid; > id_ptr = (int *) threadid; > taskid = *id_ptr; > if(taskid == 0) > strcpy(command, "select insert (1)"); > else if(taskid == 1) >

Re: [GENERAL] 5 new entries for FAQ

2005-08-10 Thread Roman Neuhauser
# kleptog@svana.org / 2005-08-10 11:22:16 +0200: > On Wed, Aug 10, 2005 at 10:44:14AM +0200, Roman Neuhauser wrote: > > > +4.22) Why are PostgreSQL table names > > > case-sensitive? > > > > http://www.postgresql.org/docs/current/static/features.html does

Re: [GENERAL] Case sensitivity

2005-08-10 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-10 13:18:32 +0200: > 1. Will SELECT WHERE LOWER(colname) = 'a001' use the index, or must I create > a separate index on LOWER(colname)? the latter -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you we

Re: [GENERAL] 5 new entries for FAQ

2005-08-10 Thread Roman Neuhauser
# kleptog@svana.org / 2005-08-10 10:02:20 +0200: > After going through pgsql-general a bit I figured there were a few > important questions missing from the FAQ, so I wrote some. > > Comments welcome. I can write more, if people can suggest things to > write about. I was thinking something about c

Re: [GENERAL] Error Loading postgresql

2005-08-09 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-06 13:37:45 +0530: > errors while loading in redhat8.0 linux > [EMAIL PROTECTED] postgrep]# ls > postgresql-8.0.3 postgresql-8.0.3.tar.bz2 > [EMAIL PROTECTED] postgrep]# cd postgresql-8.0.3 > [EMAIL PROTECTED] postgresql-8.0.3]# ./configure > checking build system ty

Re: [GENERAL] Cursor Issue??

2005-08-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-04 09:56:03 -0700: > Thanks Roman for sticking with me on this! > For whatever reason I cannot load another langage, I think it has to do > with recompiling the program and installing all the options. Not sure > though?? LANGUAGE plpgsql doesn't exist for me. Pl

Re: [GENERAL] Cursor Issue??

2005-08-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-08-02 10:01:34 -0400: > I made it happen in MicrosoftSQL using the first code below. The only > difference is I had to create variables. Which I'm having a hard time > trying to replicate it in psql. > > __Microsoft Code___ > USE test > GO > DECLARE @

Re: [GENERAL] Cursor Issue??

2005-07-28 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 12:21:34 -0700: > I found using the shell works but using the phAdminIII GUI is the one > that gives me problems. I've even tried running it on EMS PostgreSQL > Manager 3. Same results. Is this normal? > > Got a couple more questions regarding cursors. > 1. When

Re: [GENERAL] About Tools at the DB design phase.

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 10:13:10 -0700: > On Wed, 27 Jul 2005, Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2005-07-27 10:05:43 -0400: > > > I am at the design phase of the DB design. That is, I'd like to design > > > tables and relationships between

Re: [GENERAL] About Tools at the DB design phase.

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 10:05:43 -0400: > Greetings, > > I am at the design phase of the DB design. That is, I'd like to design > tables and relationships between them, but not the real implement of > tables. Could somebody suggest some good and free tools to help/ease > design the str

Re: [GENERAL] Cursor Issue??

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-26 14:06:34 -0700: > BEGIN WORK; > DECLARE cursor1 CURSOR FOR SELECT * FROM PARTS; > FETCH FIRST FROM cursor1; > CLOSE cursor1; > COMMIT WORK; > > > Query result with 1 rows discarded. > Query returned successfully with no result in 31 ms. >

Re: [GENERAL] Daily digest?

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 10:03:15 -0400: > Roman Neuhauser wrote: > ># [EMAIL PROTECTED] / 2005-07-27 08:56:24 -0400: > >>How does one receive all mail to this list in a daily digest? > > > > Have you read the mailing list usage notes on the web site

Re: [GENERAL] Daily digest?

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 08:56:24 -0400: > How does one receive all mail to this list in a daily digest? Have you read the mailing list usage notes on the web site? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't

Re: [GENERAL] Postgresql with max_connections=4096

2005-07-27 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-27 10:22:48 +0200: > Richard Huxton wrote: > >Sounds like a BEGIN being re-issued alright. Solution - fix your > >application(s) and don't use persistent connections (or if you do, > >make sure you rollback any pre-existing transactions and issue any > >relevant SET

Re: [GENERAL] Rules vs Triggers

2005-07-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-26 17:53:35 -0400: > Read the Rules section of the manual and the section on Rules vs Triggers. > > From what I get triggers are necessary for column constraints. As far as > speed, it seems there are some differences between how fast rules/triggers > would do the sam

Re: [GENERAL] back-end triggers front-end to update

2005-07-26 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-26 18:25:23 -0300: > Hello everyone,I am > searching for a way to have my postgresql 7.4.7 backend be triggered to let > the front end know there has been a change to the database. If more then one > person is connected to the database and person (x) makes a change,

Re: [GENERAL] testing castability of VARCHAR data to INET/CIDR

2005-07-23 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-23 06:04:55 -0600: > On Sat, Jul 23, 2005 at 11:31:23AM +0200, Roman Neuhauser wrote: > > > > I have a VARCHAR column containing mostly ip addresses, with an > > occasional piece of junk, and would like to transfer this data to an > > I

[GENERAL] testing castability of VARCHAR data to INET/CIDR

2005-07-23 Thread Roman Neuhauser
Hello, I have a VARCHAR column containing mostly ip addresses, with an occasional piece of junk, and would like to transfer this data to an INET column. The UPDATE (SET inet_col = CAST(vc_col AS INET)) aborts as soon as it hits an invalid datum. I'm looking for a way to add something like WHERE IS

Re: [GENERAL] Wishlist?

2005-07-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-22 12:41:25 +1000: > Tom Lane wrote: > >Bruno Wolff III <[EMAIL PROTECTED]> writes: > >>What happens if there is more than one existing function with that name > >>already. Do all of the old functions get deleted? > > > >What happens if there are existing references to

Re: [GENERAL] problem casting varchar to inet

2005-07-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-22 06:50:58 -0600: > On Fri, Jul 22, 2005 at 02:20:31PM +0200, Roman Neuhauser wrote: > > > > select cast(coalesce(nullif('', trim(callingip)), '127.0.0.1') as inet) > > > > ERROR: invalid input syntax for type ine

[GENERAL] problem casting varchar to inet

2005-07-22 Thread Roman Neuhauser
select cast(coalesce(nullif('', trim(callingip)), '127.0.0.1') as inet) ERROR: invalid input syntax for type inet: "" what is it trying to tell me? -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. htt

Re: [GENERAL] Insert into ... Select ... From ... too intelligent transaction

2005-07-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-22 13:04:27 +0200: > > > > # [EMAIL PROTECTED] / 2005-07-22 09:10:01 +0200: > > > > # [EMAIL PROTECTED] / 2005-07-21 19:11:04 +0200: > > > > > I use some updateable views to handle my data (which are > > > > > amazingly slow), which gives me ultimate flexibility to

Re: [GENERAL] Insert into ... Select ... From ... too intelligent transaction

2005-07-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-22 09:10:01 +0200: > > # [EMAIL PROTECTED] / 2005-07-21 19:11:04 +0200: > > > I use some updateable views to handle my data (which are amazingly > > > slow), which gives me ultimate flexibility to handle my data. > > > > > > there are some insert rules which use curr

Re: [GENERAL] Insert into ... Select ... From ... too intelligent transaction

2005-07-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-21 19:11:04 +0200: > I use some updateable views to handle my data (which are amazingly > slow), which gives me ultimate flexibility to handle my data. > > there are some insert rules which use currval() to get the last > sequence id for my data which I have to inser

Re: [GENERAL] function execution problem - plpgsql

2005-07-21 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-21 10:18:05 +0200: > I have two functions: funcA() drops a row from table A, funcB() drops a > row from table B that references table A. funcA() calls funcB() and > issues a delete command after returning from funcB(). I get an error, > stating that it can not be done,

Re: [GENERAL] Quotation marks in queries

2005-07-20 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-20 12:43:48 +0100: > Tony Caduto wrote: > >The easiest solution is just not to use caps or spaces in your > >table/object names, there is no advantage to doing so. > >People just need to get over the fact that having caps in a name make it > >easier to read. > > > >M

Re: [GENERAL] Case insensitive unique constraint

2005-07-14 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-14 02:14:16 -0500: > I have a simple table to store account names... I want each name to be > unique in a case insensitive manner... but I want the case the user > enters to be remembered so I can't do a simple lower() on the data's way in. CREATE TABLE tbl (col

Re: [GENERAL] To Postgres or not

2005-07-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-14 00:57:57 -0400: > On Thu, Jul 14, 2005 at 02:46:01PM +1000, Neil Conway wrote: > > Vivek Khera wrote: > > >The first sentence rules out MySQL, so the second sentence should read > > >"So that leaves Postgres". Your problem is solved ;-) > > > > > >(If you are acc

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-07-13 15:58:09 +0200: > # dev@archonet.com / 2005-07-13 14:09:34 +0100: > > Roman Neuhauser wrote: > > >callrec32=# \d fix.files > > > Table "fix.files" > > >

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
# dev@archonet.com / 2005-07-13 14:09:34 +0100: > Roman Neuhauser wrote: > >callrec32=# \d fix.files > > Table "fix.files" > > Column | Type | Modifiers > >++--- &

Re: [GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
# dev@archonet.com / 2005-07-13 12:57:31 +0100: > Roman Neuhauser wrote: > >Why does the planner want to crawl the table that has 5M rows instead of > >the one > >with 176k rows? Both tables are freshly vacuum-full-analyzed. > > Because you don't have an ind

[GENERAL] 7.4.7: strange planner decision

2005-07-13 Thread Roman Neuhauser
Why does the planner want to crawl the table that has 5M rows instead of the one with 176k rows? Both tables are freshly vacuum-full-analyzed. 7.4.7 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4) callrec32=# explain select fd.base from fix.dups fd join f

  1   2   >