[GENERAL] Proposal: GRANT cascade to implicit sequences

2004-10-12 Thread Michael Fuhr
I'd like to propose that certain GRANTs on a table cascade to the table's implicit sequences. In the current implementation (as of 7.4.5 and 8.0.0beta3), a table owner must typically issue GRANT statements on both the table and its sequences to allow other users to insert records into the table.

Re: [GENERAL] memory leak of PQmakeEmptyPGresult??

2004-10-12 Thread Ann
I found the reason of this question and fixed the bug :))xiaoling he <[EMAIL PROTECTED]> wrote: I try to detect potential memory management bugs of my program with valgrind. (PostgreSQL is at version 8.0 beta2. Operating System is Red Hat Enterprise Linux 3. Valgrind is at version 2.2.0.)     Afte

Re: [GENERAL] Change primary key in Postgres 7.3?

2004-10-12 Thread Mike Mascari
Michael Fuhr wrote: On Tue, Oct 12, 2004 at 06:10:12PM -0700, Michael Hannon wrote: We expect that we WILL eventually rebuild the database, but right now we're looking for a quick fix. Our current programmer tells me that he can't find a way to simply change the primary key "in place" in Postgre

Re: [GENERAL] Change primary key in Postgres 7.3?

2004-10-12 Thread Michael Fuhr
On Tue, Oct 12, 2004 at 06:10:12PM -0700, Michael Hannon wrote: > > We expect that we WILL eventually rebuild the database, but right now > we're looking for a quick fix. Our current programmer tells me that he > can't find a way to simply change the primary key "in place" in Postgres. Does AL

Re: [GENERAL] Application user login/management

2004-10-12 Thread Michael Glaesemann
Thank you, both Scott and Jason, for your responses. You both brought up things I hadn't thought about. I've included snippets of their posts below. On Sun, 2004-10-03 at 22:23, Michael Glaesemann wrote: Recently I've been thinking about different methods of managing users that log into a Postgr

Re: [GENERAL] Reusable pl/pgsql samples ?

2004-10-12 Thread Armen Rizal
The link is dead. I've googled the cookbook but can't find any trace of it. No luck. Thanks anyway. -armen -Original Message- From: Thomas F.O'Connell [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 13, 2004 12:15 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL]

Re: [GENERAL] Change primary key in Postgres 7.3?

2004-10-12 Thread Gavin M. Roy
DROP CONSTRAINT should be able to drop your pkey and as long as your data supports your new key... you should be set Gavin Michael Hannon wrote: Greetings. We're running Postgres 7.3 on an Intel linux box (Redhat Enterprise server, version 3.0). We find ourselves in an awkward position: we ha

[GENERAL] Change primary key in Postgres 7.3?

2004-10-12 Thread Michael Hannon
Greetings. We're running Postgres 7.3 on an Intel linux box (Redhat Enterprise server, version 3.0). We find ourselves in an awkward position: we have a database of attributes relating to students that uses as its primary key the ID number of the student. This is awkward for the following re

[GENERAL] memory leak of PQmakeEmptyPGresult??

2004-10-12 Thread xiaoling he
I try to detect potential memory management bugs of my program with valgrind. (PostgreSQL is at version 8.0 beta2. Operating System is Red Hat Enterprise Linux 3. Valgrind is at version 2.2.0.)     After Program terminated, Valgrind reports a memory lost error information as follows:==13524== 208 b

Re: [GENERAL] Very slow delete.

2004-10-12 Thread Brock Henry
Hi Tom, Thanks for your help. I checked types and indexes, to no avail. Vacuum didn't help. but vacuum full did, it's now fast again. Cheers, Brock On Mon, 11 Oct 2004 23:38:49 -0400, Tom Lane <[EMAIL PROTECTED]> wrote: > Brock Henry <[EMAIL PROTECTED]> writes: > > delete from people where id

Re: [GENERAL] deadlock with vacuum full on 7.4.5

2004-10-12 Thread Gaetano Mendola
Joseph Shraibman wrote: That is what I wanted to know, how to get the evidence for next time. select * from pg_locks Regards Gaetano Mendola ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-

Re: [GENERAL] deadlock with vacuum full on 7.4.5

2004-10-12 Thread Joseph Shraibman
That is what I wanted to know, how to get the evidence for next time. Tom Lane wrote: Joseph Shraibman <[EMAIL PROTECTED]> writes: Why then when I did a kill -INT on the vacuuming backends did everything unfreeze? You could have had other stuff backed up behind the VACUUM FULL lock requests. It's

Re: [GENERAL] deadlock with vacuum full on 7.4.5

2004-10-12 Thread Tom Lane
Joseph Shraibman <[EMAIL PROTECTED]> writes: > Why then when I did a kill -INT on the vacuuming backends did everything > unfreeze? You could have had other stuff backed up behind the VACUUM FULL lock requests. It's not impossible that you had a deadlock *outside* the database, that is some wait

Re: [GENERAL] deadlock with vacuum full on 7.4.5

2004-10-12 Thread Joseph Shraibman
Why then when I did a kill -INT on the vacuuming backends did everything unfreeze? Tom Lane wrote: Joseph Shraibman <[EMAIL PROTECTED]> writes: Last night one of these vacuum fulls deadlocked with a query on this table. Both were stuck doing nothing until I did a kill -INT on the backends doin

[GENERAL] LISTEN/NOTIFY for lightweight replication

2004-10-12 Thread Ted Shab
Hi, I'm trying to come up with a relatively simple multi-master replication solution. This is for multiple databases that need to be discreet, and change relatively infrequently (10-30 updates an hour), and almost never update each others data (less than once a day). The TCL-based replication

[GENERAL] error opening pg_clog file

2004-10-12 Thread Steve Wolfe
On Saturday, our database machine locked up hard on us due to some faulty hardware. Since then, we have been getting messages like this: ERROR: could not access status of transaction 143934068 DETAIL: could not open file "/usr/local/pgsql/data/pg_clog/0089": No such file or directory L

Re: [GENERAL] deadlock with vacuum full on 7.4.5

2004-10-12 Thread Tom Lane
Joseph Shraibman <[EMAIL PROTECTED]> writes: > Last night one of these vacuum fulls deadlocked with a query on this > table. Both were stuck doing nothing until I did a kill -INT on the > backends doing the vacuum. > So my questions: > 1) What can I do to avoid this? > 2) What do I do next time

[GENERAL] deadlock with vacuum full on 7.4.5

2004-10-12 Thread Joseph Shraibman
I have a table that is usually really small (currently 316 rows) but goes through spasams of updates in a small time window. Therefore I have a vacuum full run every hour on this table. Last night one of these vacuum fulls deadlocked with a query on this table. Both were stuck doing nothing u

Re: [GENERAL] How Do I Change The 'Owner' of a Database?

2004-10-12 Thread Steven Klassen
* pw <[EMAIL PROTECTED]> [2004-10-12 14:11:51 -0700]: > I was looking at ALTER DATABASE but the docs don't disclose any > attributes so *what the heck does one ALTER?* The actual settings are kind of nestled in the documentation a layer or two deep. Here are the pertinent URLs and neither of them

Re: [GENERAL] Change query priority

2004-10-12 Thread Gaetano Mendola
Tom Lane wrote: > Gaetano Mendola <[EMAIL PROTECTED]> writes: > >>I feel that renice a backend will not kill your system. > > > It won't kill the system, but it probably won't accomplish what you > hoped for, either. > That's true but right now renice a backend is the only way to procede in order t

Re: [GENERAL] How Do I Change The 'Owner' of a Database?

2004-10-12 Thread pw
Thanks for your help, I was looking at ALTER DATABASE but the docs don't disclose any attributes so *what the heck does one ALTER?* I'll try the query that you offered. Peter Steven Klassen wrote: There might be something you can do with 'alter database' as well. ---(end o

Re: [GENERAL] How Do I Change The 'Owner' of a Database?

2004-10-12 Thread Steven Klassen
* pw <[EMAIL PROTECTED]> [2004-10-12 13:48:30 -0700]: > How can I cahnge the owner of the database to the proper user? UPDATE pg_database SET datdba = (SELECT usesysid FROM pg_user WHERE usename = 'user_name') WHERE datname = 'database_name; There might be something you can do with 'alter databa

Re: [GENERAL] OS not good for database

2004-10-12 Thread David Siebert
I have downloaded it but it comes with no docs that I can find. No docs directory nothing. There are also people that have PHPNuke running with Postgres but that is also lacking in docs. I really do not fault Postgres or the developers for this. I will say that I feel that is why MySQL is gets a

[GENERAL] How Do I Change The 'Owner' of a Database?

2004-10-12 Thread pw
Hello, I used a user to create a database but postgreSQL insists that the 'postgres' user is the owner. It's a bit annoying to have to change users to link sequences to counter values. How can I cahnge the owner of the database to the proper user? Peter ---(end of broadca

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Greg Stark
Csaba Nagy <[EMAIL PROTECTED]> writes: > So: don't use it as a unique identifier. > > On Tue, 2004-10-12 at 17:01, Jerry LeVan wrote: > > > > Is the "Message-ID" header field a globally unique identifer? > > [Isn't it awfully confusing to put your answers before the thing you're responding to?

Re: [GENERAL] PostgreSQL v8 NAMEDATALEn >=128

2004-10-12 Thread Tino Wildenhain
Hi, Am Di, den 12.10.2004 schrieb DEHAINSALA Hondjack um 20:43: > Hi ! > sorry for my english ! I am french :-) > > I want to test postgreSQL v8 native Windows! Where i can get a version > which > allows more than 64 characters (NAMEDATALEN ~=128) to the name of > tables and > columns ? > > I g

Re: [GENERAL] data dir permissions and ownership

2004-10-12 Thread Steven Klassen
* CSN <[EMAIL PROTECTED]> [2004-10-12 11:40:52 -0700]: > chown -R postgres.nobody data > chmod -R 0700 data Try postgres.postgres, otherwise that looks okay AFAICT. -- Steven Klassen - Lead Programmer Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Replication & Support Services

[GENERAL] PostgreSQL v8 NAMEDATALEn >=128

2004-10-12 Thread DEHAINSALA Hondjack
Hi !sorry for my english ! I am french  :-)I want to test postgreSQL v8 native Windows! Where i can get a version whichallows more than 64 characters (NAMEDATALEN ~=128) to the name of tables andcolumns ?I generate automaticly tables and the length of some of these tables is > to64.I use Pos

[GENERAL] data dir permissions and ownership

2004-10-12 Thread CSN
My permissions on pg's data dir got changed. Largely just curious (since pg appears to be working fine after changing as below), is this what they should be? chown -R postgres.nobody data chmod -R 0700 data __ Do you Yahoo!? Yahoo! Mail

Re: [GENERAL] connection or query affected

2004-10-12 Thread Dennis Gearon
Steven Klassen wrote: * Dennis Gearon <[EMAIL PROTECTED]> [2004-10-12 08:13:07 -0700]: turn off autocommit Per connection. start transaction commit transaction They're statements themselves that change the state of the connection. You start a transaction, run your queries, and then commit

Re: [GENERAL] Cache lookup failed for relation, when trying to DROP

2004-10-12 Thread Andrew Sullivan
On Wed, Oct 06, 2004 at 05:25:58PM +0100, Mark Gibson wrote: > I had to remove Slony's schema manually as I was having problems > with it. I was in the process of removing all Slony related stuff, > and all my slave tables when this problem occurred, and was going to > start again from scratch. Di

Re: [GENERAL] Reusable pl/pgsql samples ?

2004-10-12 Thread Thomas F . O'Connell
Roberto Mello used to maintain a PL/PgSQL Cookbook, but this link is dead, and I don't know if it's still around: http://techdocs.postgresql.org/redir.php?link=http:// www.brasileiro.net/postgres/cookbook -tfo On Oct 11, 2004, at 4:05 AM, Armen Rizal wrote: Hello all,   Is there anybody know w

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Martijn van Oosterhout
On Tue, Oct 12, 2004 at 08:50:30AM -0700, Steve Atkins wrote: > > Is the "Message-ID" header field a globally unique identifer? > > Not a postgresql related issue, but, yes Message-ID: is, by > definition, a globally unique identifier. If there are two > messages with the same Message-ID then the

Re: [GENERAL] connection or query affected

2004-10-12 Thread Steven Klassen
* Dennis Gearon <[EMAIL PROTECTED]> [2004-10-12 08:13:07 -0700]: >turn off autocommit Per connection. >start transaction >commit transaction They're statements themselves that change the state of the connection. You start a transaction, run your queries, and then commit/rollback. >

Re: [GENERAL] Need some advice on appropriate PL strategy... ["solved/thanks"]

2004-10-12 Thread Eric D Nielsen
> From: Greg Stark <[EMAIL PROTECTED]> > Subject: Re: Need some advice on appropriate PL strategy... > Message-ID: <[EMAIL PROTECTED]> > > "Eric D. Nielsen" <[EMAIL PROTECTED]> writes: > > I guess I could alternatively just code up a simple mail function in > another PL > > and then call that func

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Martijn van Oosterhout
On Tue, Oct 12, 2004 at 10:43:09AM -0400, Tom Lane wrote: > Greg Stark <[EMAIL PROTECTED]> writes: > > I guess my confusion comes from the way postgres interprets unadorned time > > stamps as being in local time. And then always displays timestamps converted > > to local time. I thought it was reme

Re: [GENERAL] Rule uses wrong value

2004-10-12 Thread Jeff Boes
Tom Lane wrote: Jeff Boes <[EMAIL PROTECTED]> writes: Tom Lane wrote: No kidding. A rule is a macro and therefore has the usual risks of multiple evaluations of arguments. But shouldn't "new.job_id" use the value that was already recorded in the original row? There is no "v

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Csaba Nagy
On Tue, 2004-10-12 at 17:11, Csaba Nagy wrote: > No, it's not a global unique identifier. [snip] Hey, you know what ? Good that I read this thread :D I'm in the process of writing a Java SMTP server, and had no clue about this rule... although I have read a few times the relevant RFC. It's true t

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Daniel Verite
Jerry LeVan writes > I eventually want to have a cron job process my inbox and don't > want successive cron tasks to keep re-entering the same email :) That's the hard way to do it, it's easier to route messages to individual files. BTW I'm doing just that in a GPL'ed project, see the UR

[GENERAL] JDBC +CIDR

2004-10-12 Thread Johann Robette
Hi, I’ve a table containing a CIDR field. I’m using an EJB to create a new record in this table. I don’t know how to pass the CIDR value. I tried by String but I get this error :     javax.ejb.FinderException: Find failed: java.sql.SQLException: ERROR: operator does not ex

Re: [GENERAL] OS not good for database

2004-10-12 Thread Tom Lane
David Siebert <[EMAIL PROTECTED]> writes: > I also know that somewhere > their is a version of bugzilla that runs on Postgres but I have not had > much luck finding it. Red Hat runs their bugzilla on Postgres: http://bugzilla.redhat.com/bugzilla/ Source code is available from a link near the e

Re: [GENERAL] Change query priority

2004-10-12 Thread Tom Lane
Gaetano Mendola <[EMAIL PROTECTED]> writes: > I feel that renice a backend will not kill your system. It won't kill the system, but it probably won't accomplish what you hoped for, either. regards, tom lane ---(end of broadcast)

Re: [GENERAL] Rule uses wrong value

2004-10-12 Thread Tom Lane
Jeff Boes <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> No kidding. A rule is a macro and therefore has the usual risks of >> multiple evaluations of arguments. > But shouldn't "new.job_id" use the value that was already recorded in > the original row? There is no "value that was already rec

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Steve Atkins
On Tue, Oct 12, 2004 at 11:01:08AM -0400, Jerry LeVan wrote: > Hi, > I am futzing around with Andrew Stuarts "Catchmail" program > that stores emails into a postgresql database. > > I want to avoid inserting the same email more than once... > (pieces of the email actually get emplaced into several

Re: [GENERAL] Confused with LABEL and LOOP

2004-10-12 Thread Tom Lane
Tom Lane <[EMAIL PROTECTED]> writes: > "Patrick Fiche" <[EMAIL PROTECTED]> writes: >> I'm a bit confused with the use of Label for loops in PostgreSQL. > Sure looks like a bug to me. Ah-hah: it's a case-sensitivity problem. The <<>> construct downcases its label identifier, but EXIT forgets to d

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Jerry LeVan
Well, this is for my personal mail...I think I will probably give it a try. The program can log errors so in the few cases that might occur I think I can "manufacture" my own message id. I guess that the bottom line is that if it exists it is unique... Jerry On Oct 12, 2004, at 11:25 AM, Doug McNau

Re: [GENERAL] Return resultset from a function

2004-10-12 Thread Michael Fuhr
On Tue, Oct 12, 2004 at 04:15:28PM -0700, Neumann P?ter wrote: > > I'm fairly new to Postgres and ran into a problem quite soon. Until > now I used MS Sql2000 and with it I was able to write a simple > stored procedure that returned a resultset (for example: 'select * > from table1'). But

Re: [GENERAL] OS not good for database

2004-10-12 Thread David Siebert
"at the time, everybody bought Microsoft's IAS; it was the dominant web server around—85% share, something like that. And Apache just utterly crushed them" What I want to know is when did Microsoft have 85% of the web server market? I sure don't remember that. Maybe he means 85% of the Windows

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Bruce Ritchie
> I am futzing around with Andrew Stuarts "Catchmail" program > that stores emails into a postgresql database. > > I want to avoid inserting the same email more than once... > (pieces of the email actually get emplaced into several > tables). > > Is the "Message-ID" header field a globally un

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Dawid Kuroczko
On Tue, 12 Oct 2004 11:01:08 -0400, Jerry LeVan <[EMAIL PROTECTED]> wrote: > Hi, > I am futzing around with Andrew Stuarts "Catchmail" program > that stores emails into a postgresql database. > > I want to avoid inserting the same email more than once... > (pieces of the email actually get emplace

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Doug McNaught
Jerry LeVan <[EMAIL PROTECTED]> writes: > Hi, > I am futzing around with Andrew Stuarts "Catchmail" program > that stores emails into a postgresql database. > > I want to avoid inserting the same email more than once... > (pieces of the email actually get emplaced into several > tables). > > Is

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Tino Wildenhain
On Tue, 2004-10-12 at 17:01, Jerry LeVan wrote: > Hi, > I am futzing around with Andrew Stuarts "Catchmail" program > that stores emails into a postgresql database. > > I want to avoid inserting the same email more than once... > (pieces of the email actually get emplaced into several > tables).

Re: [GENERAL] Change query priority

2004-10-12 Thread Gaetano Mendola
Tom Lane wrote: Michael Fuhr <[EMAIL PROTECTED]> writes: I don't know how effective this would be, but you could wrap the system call setpriority() in a user-defined function if your platform supports it. This would set the "nice" value of the backend process, which might serve as a crude prioriti

Re: [GENERAL] Message-ID as unique key?

2004-10-12 Thread Csaba Nagy
No, it's not a global unique identifier. In fact you cannot even be sure it will always be there in all mails, depending on your mail processing chain. Most of the email clients will add one, and most of the mail transfer agents will also add one if missing, but there's no general rule of how to cr

[GENERAL] connection or query affected

2004-10-12 Thread Dennis Gearon
please cc me If I am using some server side langauge to access Postgres - php, python, perl, asp, if I make a connection, do the following actions affect the connection, or the individual query that contains them: turn off autocommit start transaction commit transaction SET schema --

Re: [GENERAL] Rule uses wrong value

2004-10-12 Thread Jeff Boes
Tom Lane wrote: Jeff Boes <[EMAIL PROTECTED]> writes: It appears that the rule is inserting the row copies into job_queue_trace with a job_id value that is one higher than the job_id from the original row. Almost as though it was re-evaluating the sequence ... No kidding. A rule is a ma

[GENERAL] Message-ID as unique key?

2004-10-12 Thread Jerry LeVan
Hi, I am futzing around with Andrew Stuarts "Catchmail" program that stores emails into a postgresql database. I want to avoid inserting the same email more than once... (pieces of the email actually get emplaced into several tables). Is the "Message-ID" header field a globally unique identifer?

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > I guess my confusion comes from the way postgres interprets unadorned time > stamps as being in local time. And then always displays timestamps converted > to local time. I thought it was remembering the time zone specified in the > original input. In fact i

Re: [GENERAL] Confused with LABEL and LOOP

2004-10-12 Thread Tom Lane
"Patrick Fiche" <[EMAIL PROTECTED]> writes: > I'm a bit confused with the use of Label for loops in PostgreSQL. > I'm using PostgreSQL 8.0 Beta2 version on WIN32 platform. > CREATE OR REPLACE FUNCTION TEST( ) RETURNS int4 AS ' > BEGIN > <> > LOOP > Raise Notice ''Loop 1''; > EXIT LOOP1; > END

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > Tom Lane <[EMAIL PROTECTED]> writes: > >> Stuart Bishop <[EMAIL PROTECTED]> writes: > >>> I'm trying to determine the best way of saying 'The current time in UTC > >>> with no time zone information'. > >> > >> Isn't

Re: [GENERAL] Rule uses wrong value

2004-10-12 Thread Tom Lane
Jeff Boes <[EMAIL PROTECTED]> writes: > It appears that the rule is inserting the row copies into > job_queue_trace with a job_id value that is one higher than the job_id > from the original row. Almost as though it was re-evaluating the > sequence ... No kidding. A rule is a macro and therefo

Re: [GENERAL] query gone haywire :)

2004-10-12 Thread Robin Ericsson
On Fri, 2004-10-08 at 10:11 -0400, Tom Lane wrote: > Robin Ericsson <[EMAIL PROTECTED]> writes: > > -> Index Scan using idx_d_entered on data (cost=0.00..18024.04 > > rows=50360 width=16) (actual time=0.210..0.247 rows=1 loops=1) > >Index Cond: 'now'::text)::timestam

Re: [GENERAL] update query confusion

2004-10-12 Thread Tom Lane
Sim Zacks <[EMAIL PROTECTED]> writes: > This syntax works in MS SQL Server to update exactly as I > expected, with the difference that you have to use the > aliasname after the update keyword and postgresql does not > allow that. > If anyone can help, I would

Re: [GENERAL] update query confusion

2004-10-12 Thread Sim Zacks
Ok. I got it working by adding "and assembliesBatch.AssembliesBatchID=a.AssembliesBatchID" to the where clause. This seems a bit awkward sytactically. Is there a cleaner way of doing it? Thank You Sim Zacks IT Manager CompuLab 04-829-0145 - Office 04-832-5251 - Fax ___

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Tom Lane
Greg Stark <[EMAIL PROTECTED]> writes: > Tom Lane <[EMAIL PROTECTED]> writes: >> Stuart Bishop <[EMAIL PROTECTED]> writes: >>> I'm trying to determine the best way of saying 'The current time in UTC >>> with no time zone information'. >> >> Isn't that a contradiction in terms? > Not if you're use

Re: [GENERAL] OS not good for database

2004-10-12 Thread Gaetano Mendola
Simon Windsor wrote: > Hi > > Can you provide a link to the interview? Ops! I forget it :-( Here it is: http://www.alwayson-network.com/comments.php?id=6186_0_4_0_C Regards Gaetano Mendolaa ---(end of broadcast)--- TIP 8: explain analyze is your frie

[GENERAL] Return resultset from a function

2004-10-12 Thread Neumann Péter
Hi Every1, I'm fairly new to Postgres and ran into a problem quite soon. Until now I used MS Sql2000 and with it I was able to write a simple stored procedure that returned a resultset (for example: 'select * from table1'). But I don't know the way how to do it in Postgres, cause I can't

[GENERAL] Confused with LABEL and LOOP

2004-10-12 Thread Patrick Fiche
Hi,   I'm a bit confused with the use of Label for loops in PostgreSQL. I'm using PostgreSQL 8.0 Beta2 version on WIN32 platform.   CREATE OR REPLACE FUNCTION TEST( ) RETURNS int4 AS '   BEGIN   <>LOOP  Rais

[GENERAL] Rule uses wrong value

2004-10-12 Thread Jeff Boes
(I thought I posted this yesterday from Google Groups, but it doesn't appear to have "taken".) I'm having a problem with a rule designed to log new rows inserted into one table. The base table is very volatile; rows are inserted from various places, including both application code and triggers.

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Michael Glaesemann
On Oct 12, 2004, at 9:43 PM, Karsten Hilbert wrote: I'm trying to determine the best way of saying 'The current time in UTC with no time zone information'. Isn't that a contradiction in terms? Not if you're used to the Unix concept of storing "seconds since the epoch". In that model the quantity

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Karsten Hilbert
> > > I'm trying to determine the best way of saying 'The current time in UTC > > > with no time zone information'. > > > > Isn't that a contradiction in terms? > > Not if you're used to the Unix concept of storing "seconds since the epoch". > In that model the quantity you're storing is entirely

[GENERAL] update query confusion

2004-10-12 Thread Sim Zacks
The following query updated all the rows in the AssembliesBatch table, not just where batchID=5. There are 2 rows in the AssembliesBatch table with batch ID of 5 and I wanted to update both of them with their price, based on the data in the from clause. One

Re: [GENERAL] 'NOW' in UTC with no timezone

2004-10-12 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Stuart Bishop <[EMAIL PROTECTED]> writes: > > I'm trying to determine the best way of saying 'The current time in UTC > > with no time zone information'. > > Isn't that a contradiction in terms? Not if you're used to the Unix concept of storing "seconds sin