Re: [GENERAL] Help with transactions

2005-03-22 Thread Michael Fuhr
On Mon, Mar 21, 2005 at 10:58:27AM -0500, Stephen Howie wrote: I've notice a couple things. I ran a couple test and at first I couldn't duplicate my error on some test tables. But I then added inheritance to one of the tables and thats when I got the error again. Are you aware that

Re: [GENERAL] Help with transactions

2005-03-21 Thread Stephen Howie
Thanks for the reply. I've notice a couple things. I ran a couple test and at first I couldn't duplicate my error on some test tables. But I then added inheritance to one of the tables and thats when I got the error again. It looks like there is an error when obtaining the seq id (nextval)

Re: [GENERAL] Help with transactions

2005-03-18 Thread Michael Fuhr
On Fri, Mar 18, 2005 at 09:22:52AM -0500, Stephen Howie wrote: I have a java program that excepts print streams and inserts in into a spool table as a bytea. This fires a pl/pgsql trigger that passes the bytea to a pl/perl function to process the bytea and spits the results as an array

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-17 Thread Alban Hertroys
Heather Johnson wrote: Hello-- I need to make sure that every time a row is inserted into a table called users rows are automatically inserted into two other tables: join_bd and behavior_demographics. The inserts on join_bd and behavior_demographics need to create rows that are keyed to the

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-17 Thread Heather Johnson
Thank you! That *is* nicer. And thanks to Michael Fuhr too for his reference to the appropriate docs and suggestions. Between your two responses, I have a much better sense of how to go about this and where to look for extra help. Heather Alban Hertroys wrote: Heather Johnson wrote: Hello-- I

Re: [GENERAL] help with plpgsql function called by trigger

2005-03-16 Thread Michael Fuhr
On Wed, Mar 16, 2005 at 02:34:48PM -0500, Heather Johnson wrote: CREATE FUNCTION insert_bd_join_bd (integer) RETURNS opaque AS ' What version of PostgreSQL are you using? The opaque type has been deprecated since 7.3; recent versions should use trigger. And trigger functions aren't declared

Re: [GENERAL] Help with tools...

2005-02-24 Thread Cristian Prieto
-general@postgresql.org Sent: Wednesday, February 23, 2005 11:16 PM Subject: Re: [GENERAL] Help with tools... Cristian Prieto [EMAIL PROTECTED] writes: I've tryied with some tools as pgEditor and EMS PostgreSQL Manager, but I need a really good pgsql and database Editor to use in Linux or Windows

Re: [GENERAL] Help with queries...

2005-02-24 Thread Joshua D. Drake
Cristian Prieto wrote: Why do I need to add to a table when doing a query? I've checked the examples and I found no one has around the table names. It is something with the configuration? If I do: select * from users; ERROR: relation users does not exist but: select * from Users; returns

Re: [GENERAL] Help with queries...

2005-02-24 Thread Michael Fuhr
On Thu, Feb 24, 2005 at 02:33:28PM -0600, Cristian Prieto wrote: select * from users; ERROR: relation users does not exist but: select * from Users; returns all the data I want... See Identifiers and Keywords in the SQL Syntax chapter of the documentation, especially the parts that talk

Re: [GENERAL] Help with queries...

2005-02-24 Thread Cristian Prieto
: Thursday, February 24, 2005 2:44 PM Subject: Re: [GENERAL] Help with queries... On Thu, Feb 24, 2005 at 02:33:28PM -0600, Cristian Prieto wrote: select * from users; ERROR: relation users does not exist but: select * from Users; returns all the data I want... See Identifiers and Keywords in the SQL

Re: [GENERAL] Help with queries...

2005-02-24 Thread Joshua D. Drake
Message - From: Michael Fuhr [EMAIL PROTECTED] To: Cristian Prieto [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Sent: Thursday, February 24, 2005 2:44 PM Subject: Re: [GENERAL] Help with queries... On Thu, Feb 24, 2005 at 02:33:28PM -0600, Cristian Prieto wrote: select * from users; ERROR

Re: [GENERAL] Help with queries...

2005-02-24 Thread Tom Lane
Cristian Prieto [EMAIL PROTECTED] writes: The book says: [snip] But my table name Grupos is not a reserved keyword, so SELECT * FROM Grupos; should work, right??? but guess what... It doesn't work too... I need to pass SELECT * FROM Grupos; You didn't read far enough: Quoting an

Re: [GENERAL] Help with tools...

2005-02-23 Thread Jason Earl
Cristian Prieto [EMAIL PROTECTED] writes: I've tryied with some tools as pgEditor and EMS PostgreSQL Manager, but I need a really good pgsql and database Editor to use in Linux or Windows. Options? Have you take a look at pgAdmin III? http://www.pgadmin.org/ What sort of features are you

Re: [GENERAL] Help with seq numbers...

2005-02-14 Thread Thomas F . O'Connell
The manual is correct. There is no way to roll back a nextval. There are a variety of workarounds suggested in the archives. Take a look. One example is precalculating a large sequence and storing it in a table. -tfo -- Thomas F. O'Connell Co-Founder, Information Architect Sitening, LLC

Re: [GENERAL] Help with seq numbers...

2005-02-14 Thread Bruno Wolff III
On Mon, Feb 14, 2005 at 15:12:56 -0600, Cristian Prieto [EMAIL PROTECTED] wrote: And it is working fine, but when I get a Unique_Violation (cuz there is a iduser already) the sequence still advance to the next value. There is any way to rollback or avoid holes in the sequence? I've read

Re: [GENERAL] Help with seq numbers...

2005-02-14 Thread javier wilson
On Mon, 14 Feb 2005 15:47:06 -0600, Cristian Prieto [EMAIL PROTECTED] wrote: why don't you use a serial? that way you don't have to insert it? i usually let postgresql take care of it, and you can use currval to return a value. That's the trouble, I need a sp that returns the user id of

Re: [GENERAL] Help with sorting (ie. ORDER BY expression)

2005-02-08 Thread Berend Tober
This can be easily done with pl/pgsql, visit the documentation at http://www.postgresql.org/docs/7.3/interactive/programmer-pl.html OT: seems like this is a questionnaire/survey application, yes? - - Jonel Rienton FWIW, given the signature: Reuben D. Budiardja, Dept. Physics and

Re: [GENERAL] Help with strange join

2005-02-07 Thread Victor Spång Arthursson
2005-02-04 kl. 20.36 skrev Mike Rylander: How about: SELECT r.* FROM opskrifter r JOIN opskrifter_content c ON (r.nummer = c.opskrift) JOIN opskrifter_ingredienser i ON (c.ingrediens = i.id) WHERE EXISTS ( SELECT l.relid FROM languages l WHERE l.relid = i.betegnelse GROUP BY l.relid HAVING

Re: [GENERAL] Help with strange join

2005-02-07 Thread Mike Rylander
On Mon, 7 Feb 2005 12:34:39 +0100, Victor Spng Arthursson [EMAIL PROTECTED] wrote: 2005-02-04 kl. 20.36 skrev Mike Rylander: How about: SELECT r.* FROM opskrifter r JOIN opskrifter_content c ON (r.nummer = c.opskrift) JOIN opskrifter_ingredienser i ON (c.ingrediens = i.id) WHERE

Re: [GENERAL] Help with sorting (ie. ORDER BY expression)

2005-02-07 Thread Jonel Rienton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, This can be easily done with pl/pgsql, visit the documentation at http://www.postgresql.org/docs/7.3/interactive/programmer-pl.html OT: seems like this is a questionnaire/survey application, yes? - - Jonel Rienton http://blogs.road14.com

Re: [GENERAL] Help with sorting (ie. ORDER BY expression)

2005-02-06 Thread Bruno Wolff III
On Sat, Feb 05, 2005 at 17:25:06 -0500, Reuben D. Budiardja [EMAIL PROTECTED] wrote: Hello, I am running postgres-7.3. I have a query like this: SELECT question_id, question_text FROM quiz_table WHERE question_id IN (2,10,3,6,4,5); But I want the output to be sorted in the way I give

Re: [GENERAL] Help with access check

2005-02-06 Thread Alvaro Herrera
On Sun, Feb 06, 2005 at 03:28:31PM +0100, Thomas Hallgren wrote: Hi, From code inside a C-function, given the AclId of a user and the Oid of a Schema, what's the most efficient way to find out if the user has been granted CREATE on the schema? See src/backend/catalog/aclchk.c, function

Re: [GENERAL] Help with sorting (ie. ORDER BY expression)

2005-02-05 Thread Jonel Rienton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, This can be easily done with pl/pgsql, visit the documentation at http://www.postgresql.org/docs/7.3/interactive/programmer-pl.html OT: seems like this is a questionnaire/survey application, yes? - - Jonel Rienton http://blogs.road14.com

Re: [GENERAL] Help with strange join

2005-02-04 Thread Mike Rylander
On Fri, 4 Feb 2005 09:44:15 +0100, Victor Spng Arthursson [EMAIL PROTECTED] wrote: God morning, everybody! I have a problem that I don't seem to be able to solve by my self, thats why I kindly ask the list now I have a database containing some tables, containing different receipts.

Re: [GENERAL] Help with strange join

2005-02-04 Thread Alban Hertroys
Victor Spng Arthursson wrote: The tables are link according to the following: receipts - related_ingredients - ingredients - languages If I just do JOINs, I will not be able to find out if only one or all of the ingredients are translated. What I need is something that, for example, returns the

Re: [GENERAL] Help with strange join

2005-02-04 Thread Victor Spång Arthursson
2005-02-04 kl. 13.00 skrev Mike Rylander: Can you send the table structure and the query that does this? It may just be a matter of adding a subselect with a HAVING clause, but we won't know until we have more information. Sure - coming up! First table is the main receipt table: tostipippitest=#

Re: [GENERAL] Help with strange join

2005-02-04 Thread Mike Rylander
On Fri, 4 Feb 2005 17:52:45 +0100, Victor Spng Arthursson [EMAIL PROTECTED] wrote: 2005-02-04 kl. 13.00 skrev Mike Rylander: Can you send the table structure and the query that does this? It may just be a matter of adding a subselect with a HAVING clause, but we won't know until we

Re: [GENERAL] help with a stored procedure

2005-01-03 Thread Michael Fuhr
On Mon, Jan 03, 2005 at 08:29:18AM -0600, Jason Tesser wrote: I am new to postgres stored procedures and would like a little help. My function basically takes 2 arguments and inserts data into a table from a select statement. I want it to return the number of records inserted. See Obtaining

Re: [GENERAL] Help needed with QueryPlan

2004-12-16 Thread Alex
Richard, thanks for the reply. I actually did what you suggested but still the same. Now i set ENABLE_SEQSCAN=false in the perl script which works but I dont think thats the way it shold be done. Alex Richard Huxton wrote: Alex wrote: Hi, I have a query that runs pretty slow and tried to use

Re: [GENERAL] Help needed with QueryPlan

2004-12-14 Thread Richard Huxton
Alex wrote: Hi, I have a query that runs pretty slow and tried to use explain to see where the problem is. Both tables have 2.1 and 2.8 million records. In the Explain output I see that a Seq Scan is used on nval_price_hist what I dont quite understand. Could some one help me creating the correct

Re: [GENERAL] HELP speed up my Postgres

2004-11-25 Thread Anatoly Okishev
SQL: update SUBSCRIPTIONTABLE set ACTIVEFLAG='Y' where mobile_num in (select mobile_num from LOADED_MOBILE_NUMBERS) You can try this: update SUBSCRIPTIONTABLE, LOADED_MOBILE_NUMBERS set SUBSCRIPTIONTABLE.ACTIVEFLAG='Y' where LOADED_MOBILE_NUMBERS.mobile_num=SUBSCRIPTIONTABLE.mobile_num Anatoly.

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Patrick Fiche
Have a try at this syntax SELECT number FROM procedures WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP; Patrick -- - Patrick Fiche email : [EMAIL PROTECTED] tél : 01 69 29 36 18

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Scott Nixon
Have a try at this syntax SELECT number FROM procedures WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP; Patrick Cool! Thanksthat works perfectly. -Scott ---(end of broadcast)--- TIP 2: you can get

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Ian Barwick
On Mon, 22 Nov 2004 15:12:26 +0100, Patrick Fiche [EMAIL PROTECTED] wrote: Have a try at this syntax SELECT number FROM procedures WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP; Just for the record you could write it like this too: SELECT number FROM procedures

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Peter Eisentraut
Ian Barwick wrote: On Mon, 22 Nov 2004 15:12:26 +0100, Patrick Fiche [EMAIL PROTECTED] wrote: Have a try at this syntax SELECT number FROM procedures WHERE date + CAST( numdays || ' days' AS interval ) = CURRENT_TIMESTAMP; Just for the record you could write it like this too:

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Scott Nixon
Just to add to the record, the mathematically sound way to write this query would be this: SELECT number FROM procedures WHERE date + numdays * interval '1 day' = current_timestamp; Thanks for that Peter! That's a lot closer than what I originally had...I didn't think about doing that

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Tom Lane
Scott Nixon [EMAIL PROTECTED] writes: Am having some trouble with a query that worked in 7.0 but not in 7.3.can't seem to figure out the syntax or find info about how to do this anywhere. SELECT number FROM procedures WHERE date + numdays = CURRENT_TIMESTAMP; In 7.0 this works with

Re: [GENERAL] Help with syntax for timestamp addition

2004-11-22 Thread Scott Nixon
So I think what you probably *really* want is ... WHERE CAST(date AS date) + numdays = CURRENT_DATE; Thanks Tom! Yeah, I guess you are right on that point. I hadn't thought about that. The implementation of this wouldn't be affected since this query is buried in a script that runs

Re: [GENERAL] Help on copy function

2004-10-06 Thread Tom Lane
[EMAIL PROTECTED] writes: And an error occurs : psql:lineitem.loader.psql:1: ERROR: could not extend relation 24342131/24342133 /24342324: There is not enough space in the file system. HINT: Check free disk space. but my fileSystem has something like 2Go free when copy fails! Maybe you

Re: [GENERAL] Help on copy function

2004-10-06 Thread Doug McNaught
Tom Lane [EMAIL PROTECTED] writes: [EMAIL PROTECTED] writes: And an error occurs : psql:lineitem.loader.psql:1: ERROR: could not extend relation 24342131/24342133 /24342324: There is not enough space in the file system. HINT: Check free disk space. but my fileSystem has something like

Re: [GENERAL] Help on copy function

2004-10-06 Thread Tom Lane
Doug McNaught [EMAIL PROTECTED] writes: psql:lineitem.loader.psql:1: ERROR: could not extend relation 24342131/24342133 /24342324: There is not enough space in the file system. HINT: Check free disk space. Maybe you are running the postmaster under a disk-space-usage limit? I'm not sure

Re: [GENERAL] Help on copy function

2004-10-06 Thread Doug McNaught
Tom Lane [EMAIL PROTECTED] writes: Doug McNaught [EMAIL PROTECTED] writes: It's also possible that PG is trying to create a new table file and he's out of inodes... Good thought, although I think that this particular error message would only come out from a seek/write failure and not from

Re: [GENERAL] help with trigger

2004-08-27 Thread Dino Vliet
Maybe I've missed it but can someone plese help me with this? Brgds and thanks in advance, --- Dino Vliet [EMAIL PROTECTED] wrote: Hi folks, I'm new to PostgreSQL and am busy tring to work with it. Of pl/pgsql I know even less and that's the part I have a question on right now. I have this

Re: [GENERAL] Help with optimizing query

2004-08-20 Thread Gaetano Mendola
Marek Lewczuk wrote: Hello, I have a query, which is quite big and there is a huge difference between execution time in MySQL and PostgreSQL. I think that I have made all possible steps to increase the speed of the query, but unfortunately it is still about 100 times slower. I'm out of ideas

Re: [GENERAL] Help with optimizing query

2004-08-20 Thread Dann Corbit
If you supply the following: 1. The schema (including available indexes) for each table in the query 2. The actual query 3. The row counts for the tables via select count(*) I suspect that someone can formulate a query that is as fast as you need. -Original Message- From: [EMAIL

Re: [GENERAL] Help needed on time data types

2004-07-12 Thread Michal Taborsky
mike wrote: I cannot seem to find a field type in postgres that is equivalent to h:mm without enforcing a 24 hour day limit. This seems to preclude pg from use - am I correct? You want to use interval data type and then do some formatting on the output to get 123 hours 30 minutes. See:

Re: [GENERAL] Help needed on time data types

2004-07-12 Thread Peter Eisentraut
mike wrote: All the date-time types seem to only be for specific time dates and not for a running total. You probably want the interval type. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send

Re: [GENERAL] HELP

2004-07-09 Thread Richard Huxton
Marek Nowiski wrote: I accidentaly deleted over 1.000.000 records from one table in my database. Is there any way to recover them? Please help me as soon as possible... After the records were deleted, no other operation was made on the database. In fact, all the postgres services were shut down. I

Re: [GENERAL] help required

2004-07-08 Thread Alvaro Herrera
On Mon, Jul 05, 2004 at 05:40:34PM +0800, Ramesh Yeligar wrote: We have been using pgsql for our retail business, now, due hard drive crash, the databse corrupted and we are unable to start pgsql database. Pl help me if you know any commands or tools to recover this database. You'd need to

Re: [GENERAL] Help with query: indexes on timestamps

2004-07-07 Thread Richard Huxton
Keith C. Perry wrote: I have a table with with 1 million records in it. Here is the definition CREATE TABLE report ( match int4, action varchar(16), stamp timestamptz, account varchar(32), ipaddress inet, profile varchar(16), rating text, url text ) WITHOUT OIDS; The is one

Re: [GENERAL] Help with query: indexes on timestamps

2004-07-07 Thread Keith C. Perry
Quoting Richard Huxton [EMAIL PROTECTED]: Keith C. Perry wrote: I have a table with with 1 million records in it. Here is the definition CREATE TABLE report ( match int4, action varchar(16), stamp timestamptz, account varchar(32), ipaddress inet, profile

Re: [GENERAL] Help please - completely baffled by quoting

2004-06-20 Thread Peter Eisentraut
Tim Robinson wrote: select * from temp where a like 'a\\\'%' this should return all strings starting with a\' but it returns nothing!!! \ is also the quoting character of LIKE, in addition to being a quoting character on the string literal level. If you want all strings starting with

Re: [GENERAL] Help please - completely baffled by quoting

2004-06-20 Thread Tim Robinson
-Original Message- From: Peter Eisentraut [mailto:[EMAIL PROTECTED] Sent: 20 June 2004 14:07 To: Tim Robinson; [EMAIL PROTECTED] Subject: Re: [GENERAL] Help please - completely baffled by quoting Tim Robinson wrote: select * from temp where a like 'a\\\'%' this should

Re: [GENERAL] Help in finding the error

2004-06-08 Thread Tom Lane
Duane Lee - EGOVX [EMAIL PROTECTED] writes: I'm trying to insert data into an empty table but I keep getting the error: ERROR: could not open relation with OID 42939 More detail please? For starters, what PG version is this? I have a couple of constraints on the table but what I'm entering

Re: [GENERAL] help needed regarding Query processing in postgres

2004-04-10 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: hi all, I am an M.Tech student of IITBombay,india. We are doing a project on access control in postgres. Is there any way in which, i can add a extra predicate to the sql query given to the postgres database table. please if any body could help me in this

Re: [GENERAL] Help with a query

2004-02-27 Thread Bas Scheffers
If the user/groups you are talking about are postgres users and groups, this is it: select * from pg_catalog.pg_group where (select usesysid from pg_catalog.pg_user where usename = 'user') = any(grolist) The place to find this kind of thing is the Postgres Internals section (system catalogs)

Re: [GENERAL] Help with a query

2004-02-27 Thread Bas Scheffers
Klint, select groname from pg_group where (select usesyside from pg_shadow where usename = 'postgres') = any(grolist); Unless you are lgged in as superuser (and applications other than pgAdmin et al shouldn't be) you will get access denied on pg_shadow. (because it contains passwords)

Re: [GENERAL] Help with a query

2004-02-26 Thread Klint Gore
On Thu, 26 Feb 2004 16:47:10 -0500, Alexander Cohen [EMAIL PROTECTED] wrote: Im trying to get a list of all groups that a certain user is a member of. Can anyone help me with the sql to get that? select groname from pg_group where (select usesyside from pg_shadow where usename = 'postgres') =

Re: [GENERAL] HELP with a Query

2004-02-21 Thread Martijn van Oosterhout
On Sat, Feb 21, 2004 at 05:20:51PM +0900, Alex wrote: Hi, I need some help with a query. I use a reference table to lookup some codes. Everything works well if the reference table contains a reference but the query fails if no reference fails (Z.ref_code=123456). What I need to is either

Re: [GENERAL] help with query speed

2004-02-12 Thread Jason Tesser
Hi I have the below query written. I have removed a lot from the select Statement for simplicity sake. The query takes way too long. I am moving from an Access backend to a Postgres back with Access in the front. The below query is taking like 14-20 seconds. Is their a better way I

Re: [GENERAL] help with query speed

2004-02-12 Thread scott.marlowe
On Thu, 12 Feb 2004, Jason Tesser wrote: I have the below query written. I have removed a lot from the select Statement for simplicity sake. The query takes way too long. I am moving from an Access backend to a Postgres back with Access in the front. The below query is taking like 14-20

Re: [GENERAL] help with query speed

2004-02-12 Thread Jason Tesser
big snip You didn't answer my question about whether they are the same types. Are they? Yes but testclass is a view. But the field it is referencing is of the same type. ---(end of broadcast)--- TIP 7: don't forget to increase your free space

Re: [GENERAL] help with query speed

2004-02-12 Thread Dann Corbit
-Original Message- From: Jason Tesser [mailto:[EMAIL PROTECTED] Sent: Thursday, February 12, 2004 10:03 AM To: [EMAIL PROTECTED] Subject: [GENERAL] help with query speed I have the below query written. I have removed a lot from the select Statement for simplicity sake. The

Re: [GENERAL] help with query speed

2004-02-12 Thread scott.marlowe
On Thu, 12 Feb 2004, Jason Tesser wrote: Hi I have the below query written. I have removed a lot from the select Statement for simplicity sake. The query takes way too long. I am moving from an Access backend to a Postgres back with Access in the front. The below query is

Re: [GENERAL] Help, I've killed my system?

2004-01-28 Thread Martijn van Oosterhout
On Wed, Jan 28, 2004 at 05:01:32PM +1100, Dean Grubb wrote: Hi, I have a debian server running postgresql 7.03 from the packages and also postgresql 7.1.3 from source. After doing an upgrade to some system files (ahrr...apt-get is good but I like freeBSD ports) I find that I no longer

Re: [GENERAL] Help, I've killed my system?

2004-01-28 Thread Tom Lane
Dean Grubb [EMAIL PROTECTED] writes: I have a debian server running postgresql 7.03 from the packages and also postgresql 7.1.3 from source. After doing an upgrade to some system files (ahrr...apt-get is good but I like freeBSD ports) I find that I no longer have the postgresql 7.03

Re: [GENERAL] Help with PostgreSQL porting project

2004-01-02 Thread Enver ALTIN
Hi, On Fri, 2004-01-02 at 13:38, Chris Travers wrote: A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light, fast database abstraction layer which conforms to the

Re: [GENERAL] Help with PostgreSQL porting project

2004-01-02 Thread Arjen van der Meijden
Enver ALTIN wrote: Hi, On Fri, 2004-01-02 at 13:38, Chris Travers wrote: A few years ago, I set about porting a PHP application from MySQL to PostgreSQL, after realizing that MySQL wasn't going to be able to handle it. In order to do this, I built a light, fast database abstraction layer which

Re: [GENERAL] Help with PostgreSQL porting project

2004-01-02 Thread Enver ALTIN
Hi, On Fri, 2004-01-02 at 14:20, Arjen van der Meijden wrote: Are those two LIGHT weight? Afaik, PEAR (DB) affects the performance of your OO-php-app quite bad, but I haven't really tested it very often myself, just seen tests by others? And I'm not talking quite bad, because php is not very

Re: [GENERAL] Help with PostgreSQL porting project

2004-01-02 Thread Chris Travers
the db's behave the same. It is NOT OO. Best Wishes, Chris Travers - Original Message - From: Arjen van der Meijden [EMAIL PROTECTED] To: Enver ALTIN [EMAIL PROTECTED] Cc: Chris Travers [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, January 02, 2004 7:20 PM Subject: Re: [GENERAL] Help

Re: [GENERAL] Help With date/time

2003-11-08 Thread Steve Crawford
On Saturday 08 November 2003 9:04 am, Alex wrote: Hi, I want to remove data that is older that a certain number of months.. only full months. example: today is 11-08 and I want do delete all data that is older than this month - 3 month i.e. i want to delete all information that is older

Re: [GENERAL] Help on update that subselects other records in table, uses joins

2003-11-06 Thread Manfred Koizar
On Thu, 6 Nov 2003 00:50:06 +0900, Michael Glaesemann [EMAIL PROTECTED] wrote: What I came up with was deleting and reinserting the relevant ordercharges rows This might have unwanted side effects (think ON DELETE CASCADE). Good point. At this stage in my PostgreSQL progress, I haven't been

Re: [GENERAL] Help on update that subselects other records in table, uses joins

2003-11-05 Thread Manfred Koizar
On Wed, 5 Nov 2003 02:58:28 +0900, Michael Glaesemann [EMAIL PROTECTED] wrote: UPDATE ordercharges SET orderchargeasbilled = 0.065 * sale.orderchargeasbilled FROM orders AS o, ordercharges AS sale WHERE ordercharges.orderchargecode = 'SH' AND ordercharges.orderid = o.orderid AND

Re: [GENERAL] Help on update that subselects other records in table, uses joins

2003-11-05 Thread Michael Glaesemann
Manfred, Thanks for taking the time to walk me through this. You've pointed out things I've noticed when writing queries and wondered about. (More specific commentsand commentarybelow. What I came up with was deleting and reinserting the relevant ordercharges rows This might have unwanted side

Re: [GENERAL] help from Portugal

2003-10-31 Thread Fernando Schapachnik
Looks like the new DB might have been initialized with a different locale. Read about locales and initdb in the docs. Good luck. Fernando. En un mensaje anterior, Pedro Miguel Guedes escribió: [...] The problem seems to be on accent on letters. So I thought maybe some stuff on

Re: [GENERAL] Help or Bug?

2003-10-20 Thread Richard Huxton
On Monday 20 October 2003 16:19, Cláudia Morgado wrote: Tom Lane, This problem was solved with the suggested permission. GRANT USAGE ON SCHEMA wlog_data TO wlog_uni; There is the possibility of us to consult the permission above in the database? SELECT * FROM pg_namespace ; For tables,

Re: [GENERAL] help with TCL function

2003-09-11 Thread Rolf Jentsch
Am Donnerstag, 11. September 2003 08:59 schrieben Sie: Op 11 Sep 2003 (0:45), schreef ljb [EMAIL PROTECTED]: ... -- This is the function create or replace function tlow() returns trigger as ' set NEW($1) [string tolower $NEW($1)] return [array get NEW]' language 'pltcl'; ... You could

Re: [GENERAL] help with TCL function

2003-09-11 Thread Jules Alberts
Op 11 Sep 2003 (0:45), schreef ljb [EMAIL PROTECTED]: I think you're missing something. When you use a Tcl function as a trigger, any arguments (like $1) are explicitly supplied in the CREATE TRIGGER command. You either define the trigger to call the function with a constant argument or not;

Re: [GENERAL] help with TCL function

2003-09-11 Thread darren
Ok you can user the info exists function that is part of TCL i.e. if { [info exists NEW($1)] } { or if 1 is the problem do if { [info exists 1] } { This will allow you to determine if it exists. If you want to see what variables exist at this level elog [info vars] and it will show you all

Re: [GENERAL] help with TCL function

2003-09-10 Thread Richard Huxton
On Wednesday 10 September 2003 14:27, Jules Alberts wrote: I use it to force lowercase of values inserted in the db. There is one problem though, if the parameter is absent, the function will give an error message. I would like it to rather check for null before tolower is applicated. In

Re: [GENERAL] Help! Can't pg_dump anything: handler procedure for procedural language plpgsql not found

2003-08-14 Thread Tom Lane
[EMAIL PROTECTED] (Mark Mikulec) writes: But i'd always get the following error message: pg_dump: handler procedure for procedural language plpgsql not found Do you have any functions written in plpgsql? (I'm guessing not, or you would have other problems besides pg_dump not working.) If

Re: [GENERAL] Help! Can't pg_dump anything: handler procedure for procedural language plpgsql not found

2003-08-14 Thread Richard Huxton
On Tuesday 12 August 2003 01:41, Mark Mikulec wrote: Hi there, I wonder if anyone can shed some light on a very frustrating problem. I'm running a debian linux 3.0 woody server, nothing special, with the latest version of postres that apt-get will allow me, which I *think* it;s 7.1

Re: [GENERAL] Help with privilege or pg_hba.conf

2003-07-19 Thread Ken Godee
Arcadius A. wrote: Hello! I have a Unix box running PostgreSQL 7.3.3. So far, I have been the only one user of the DB server...and I didn't have any problem using it with the JDBC driver. Now, a friend of mine wants to use the DB too for doing web stuffs(PHP, JSP) so I need to create a new

Re: [GENERAL] Help: Postgres, Java and Extended Characters? Solved

2001-09-14 Thread rjb26
On Sat, 08 Sep 2001 13:34:44 +0200, [EMAIL PROTECTED] wrote: Help, I have moved an application from one Linux box to another, running Java Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24) Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode) Redhat7.1 Apache JServ 1.1.2

Re: [GENERAL] help on delete trigger.

2001-08-14 Thread Jan Wieck
Sundararajan wrote: I am developing a db application in postgresql and i need to write a delete trigger on one of the tables. the environment is table1 field1 varchar(64) other fields. table 2. field1 varchar(64) other fields I need a delete trigger on the table 1, so that if I

Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke

2001-08-05 Thread Trond Eivind Glomsrød
Tom Lane [EMAIL PROTECTED] writes: Lamar Owen [EMAIL PROTECTED] writes: A pg_dump that can't be restored should be a release forcer, IMHO. Let's not panic here. The actual net effect of these bugs will be that the pg_dump output script fails to restore the permissions and/or comment

Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke

2001-08-05 Thread Tom Lane
[EMAIL PROTECTED] (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes: Are those also in the 7.1-stable branch? Yes. There are quite a few fixes in the stable branch since 7.1.2, actually. I made a list last week of commits that either were already in REL7_1_STABLE, or looked like they deserved

Re: [GENERAL] [HELP] Attribute has an unknown type/is repeated

2001-06-26 Thread Tom Lane
Itzinger, Oskar [EMAIL PROTECTED] writes: 1. What exactly is the type of colx in Case 1? 2. Why can't PostgreSQL infer that very same type for colx in Case 2? The || operator is known to yield a result of type text. But when the sum total of the known information is '' AS colx there

Re: [GENERAL] [HELP] Attribute has an unknown type/is repeated

2001-06-26 Thread Thalis A. Kalfigopoulos
On Tue, 26 Jun 2001, Itzinger, Oskar wrote: In PostgreSQL 7.1.2, I'm experimenting with the following two cases (all referred to non-temporary tables exist in the current database): = 1. CREATE TEMPORARY TABLE tmp ( col1 TEXT, col2 TEXT, col3 TEXT, col4 TEXT,

Re: [GENERAL] [Help] Temporary Table: Implicitely created index not shown in \d i

2001-06-19 Thread Tom Lane
Itzinger, Oskar [EMAIL PROTECTED] writes: CREATE TEMPORARY TABLE junk (col1 SERIAL, more cols) and check \ds, the implicitely created sequence is shown but \di doesn't show the implicitely created index. \d and \di don't show temp tables and indexes. The sequence object should be temp as

Re: [GENERAL] Help with: my bits moved right off the end of the world!

2001-06-05 Thread Tom Lane
Martin Weinberg [EMAIL PROTECTED] writes: Folks, we have been getting: FATAL 1: my bits moved right off the end of the world! Recreate index pg_attribute_relid_attnam_index. Oh, that old thing :-(. If you have a way to reproduce this from a standing start (virgin database) I'd be very

Re: [GENERAL] Help with C++

2001-05-29 Thread Tim Barnard
the 11 message thread in the archives, starting with: http://fts.postgresql.org/db/mw/msg.html?mid=114659 Tim - Original Message - From: Justin Clift [EMAIL PROTECTED] To: Tim Barnard [EMAIL PROTECTED] Sent: Tuesday, May 29, 2001 3:42 AM Subject: Re: [GENERAL] Help with C++ Hi Tim

Re: [GENERAL] Help with C++

2001-05-28 Thread Tim Barnard
Look in the programmer docs For C: www.postgresql.org/idocs/index.php?libpq.html For C++: www.postgresql.org/idocs/index.php?libpqplusplus.html Tim - Original Message - From: Mayan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 21, 2001 10:36 PM Subject: [GENERAL]

Re: [GENERAL] Help: Change the SQL query length

2001-05-11 Thread Tom Lane
Marcos Cruz [EMAIL PROTECTED] writes: I'm changing a database from Access'97 to PostgreSQL 7.1.1 and found a query limit when a I have large text field into the SQL insert. The returned msg is like query too long, length 8191 octets Hm, I notice #define TEXT_FIELD_SIZE 8190

Re: [GENERAL] help with serial type

2001-04-26 Thread Peter Eisentraut
Jason writes: Hi , I'm a postgreSQL newbie. I have a table called atable that has the columns: title varchar(20) name varchar(20) id serial if I do: INSERT INTO TABLE atable VALUES('SQL1','Jason') the 'id' gets updated with a new number automatically. I then later added a new column

Re: [GENERAL] Help on PGSQL

2001-04-14 Thread will trillich
On Fri, Apr 13, 2001 at 02:28:29PM +0530, Masood Rezvi wrote: We are a firm of web developers in Lucknow, India. We are new to PGSQL but have this database on the webserver (Apache running on Linux Red Hat). We need help on learning PGSQL information on tutorials and also to know whether it

Re: [GENERAL] Help me please!! -newbie-

2001-01-24 Thread Tom Lane
"[Bad-Knees]" [EMAIL PROTECTED] writes: Anyone got a solution for this error: initdb: pg_encoding failed Is your PATH pointing at the right set of Postgres executables? I think that would happen if initdb finds a 'postgres' in PATH that doesn't have pg_encoding along with it, which would

RE: [GENERAL] Help with SQL Function

2001-01-08 Thread Jeff Eckermann
:[EMAIL PROTECTED]] Sent: Saturday, January 06, 2001 3:41 PM To: Jeff Eckermann Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] Help with SQL Function Jeff Eckermann [EMAIL PROTECTED] writes: extracts=# create function testfunc(text) returns int4 as ' extracts'# select count

Re: [GENERAL] Help me for DBI-connect failed: Sorry, too many clients already.

2000-12-19 Thread Marc SCHAEFER
On Tue, 19 Dec 2000, Joseph wrote: $dbh=DBI-connect("dbi:Pg:dbname=$dbname",$dbusername,$dbpassword) or die "can I would assume that if you never disconnect and are running under mod_perl, you will have problems.

Re: [GENERAL] help with referential integrity

2000-12-12 Thread Stephan Szabo
On Mon, 11 Dec 2000, Soma Interesting wrote: I'm attempting, for the first time, to make use of referential integrity, but I'm getting an error. Warning: PostgreSQL query failed: ERROR: referential integrity violation - key referenced from LessonsPages not found in Lessons Here is

<    3   4   5   6   7   8   9   >