Re: [HACKERS] [SQL] ARRAY() returning NULL instead of ARRAY[] resp. {}

2005-05-24 Thread Markus Bertheau
Dnia 24-05-2005, wto o godzinie 00:06 -0400, Tom Lane napisa(a): Joe Conway [EMAIL PROTECTED] writes: Markus Bertheau wrote: why does SELECT ARRAY(SELECT 1 WHERE FALSE) return NULL instead of ARRAY[] resp. '{}'? Why would you expect an empty array instead of a NULL? I think he's got

Re: [HACKERS] Speeding up the Postgres lexer

2005-05-24 Thread Simon Riggs
On Mon, 2005-05-23 at 22:43 -0400, Tom Lane wrote: Based on the comments so far in this thread, I'll go ahead and commit the patch, with some comments attached of course --- in particular a big head comment to run flex with -b and see that lex.backup says something to this effect. flex counts

Re: [HACKERS] Notification when freespaces empty

2005-05-24 Thread ITAGAKI Takahiro
Simon Riggs [EMAIL PROTECTED] wrote: Furthermore, this patch detaches empty fsmpages then. Does that do anything useful though? I thought we don't reallocate until VACUUM time, whereupon we identify any empty slots and reuse them. Who cares whether we deallocate earlier? Yes, we cannot

Re: [HACKERS] INSTEAD OF trigger on VIEWs

2005-05-24 Thread Russell Smith
On Tue, 24 May 2005 01:26 am, --= Tono =-- wrote: I have tried using INSTEAD rules but there are some conditional logic that needs to happen inside the rule (performing counts, getting and storing the primary key of the master record etc.). AFAIK, rules only allows conditional logic to be

[HACKERS] SELECTs inside of VIEWs (WAS: INSTEAD OF trigger on VIEWs)

2005-05-24 Thread Jan B.
I tried using SELECTs inside of RULEs, but as I already explained in this mail thread, the problem is, that a SELECT creates a result set, which can not be discarded in SQL. This makes trouble when using asynchronous command processing. I have tried to modify my application in order to get a

[HACKERS] 8.0.x RPM issues

2005-05-24 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm trying to install 8.0.3 on a RH9.0. I do have few problems: 1) They do not exist for 9.0 2) Using the 8.0.2 rpm I get: # rpm -Uvh --test *.rpm warning: postgresql-8.0.2-1PGDG.i686.rpm: V3 DSA signature: NOKEY, key ID 748f7d0e error:

Re: [HACKERS] 8.0.x RPM issues

2005-05-24 Thread Dave Cramer
Check the archives, this has already been discussed. Devrim is posting a compat rpm shortly. Dave Gaetano Mendola wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I'm trying to install 8.0.3 on a RH9.0. I do have few problems: 1) They do not exist for 9.0 2) Using the 8.0.2 rpm

Re: [HACKERS] Speeding up the Postgres lexer

2005-05-24 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Would we use the -x switch if we had it? Dunno. Depending on such a thing would require depending on a new flex version, and seeing that the flex guys haven't put out a new release since the badly broken 2.5.31 more than 2 years ago, I wouldn't hold my

Re: [HACKERS] SELECTs inside of VIEWs (WAS: INSTEAD OF trigger on VIEWs)

2005-05-24 Thread Jeff Eckermann
Jan B. [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I tried using SELECTs inside of RULEs, but as I already explained in this mail thread, the problem is, that a SELECT creates a result set, which can not be discarded in SQL. This makes trouble when using asynchronous command

Re: [HACKERS] SELECTs inside of VIEWs (WAS: INSTEAD OF trigger on VIEWs)

2005-05-24 Thread Tom Lane
Jan B. [EMAIL PROTECTED] writes: Does anyone know, if it is intended that one query can create multiple result tables with some of them carrying an empty string as cmdStatus? Perhaps this is a bug? Yes it is, and no it isn't. Check the archives --- there was extensive discussion of what

Re: [HACKERS] 8.0.x RPM issues

2005-05-24 Thread Gaetano Mendola
Dave Cramer wrote: Check the archives, this has already been discussed. Devrim is posting a compat rpm shortly. Thx. Regards Gaetano Mendola ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] 8.0.x RPM issues

2005-05-24 Thread Dave Cramer
You can find it here if you need it quickly http://postgresql.gunduz.org/rpms/compat-postgresql-libs-3-1PGDG.i686.rpm Dave Gaetano Mendola wrote: Dave Cramer wrote: Check the archives, this has already been discussed. Devrim is posting a compat rpm shortly. Thx. Regards Gaetano

[HACKERS] IN/OUT parameters

2005-05-24 Thread Dave Cramer
I've been working on adding the functionality into the jdbc driver and I'm having some issues. Currently the bind message does not know anything about directionality of the parameter. This means that considerable gyrations need to be done by the driver to transform create function foo( out

Re: [HACKERS] 8.0.x RPM issues

2005-05-24 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Gaetano, On Tue, 24 May 2005, Dave Cramer wrote: You can find it here if you need it quickly http://postgresql.gunduz.org/rpms/compat-postgresql-libs-3-1PGDG.i686.rpm Yeah, that package was tested on 5 platforms. Also Dave Cramer confirmed

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Tom Lane
Dave Cramer [EMAIL PROTECTED] writes: On a related note, drop function needs to support the in/out direction. It does ... do you see a problem? regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at

[HACKERS] postmaster.pid disappeared

2005-05-24 Thread Junaili Lie
Hi, I was redirected to this maillist when i asked questions on irc. I hope this is the right mailing list. I am running postgresql 7.4.8 on solaris 10 (and I compile and installed slony). Everytime I am trying to reload the configuration using pg_ctl reload -D $PGDATA, it deleted the

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Josh Berkus
H It seems to me that the bind message needs to support the notion of direction in order for this to work cleanly. Alternatively we could punt and use SQL Server's mechanism where they only support IN, and INOUT, which would require all parameters to be sent to the procedure. Does

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Josh Berkus
Junaili, I am running postgresql 7.4.8 on solaris 10 (and I compile and installed slony). Everytime I am trying to reload the configuration using pg_ctl reload -D $PGDATA, it deleted the postmaster.pid and didn't create a new one. So, after reload, the only way I can restart the server is by

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Tom Lane
Dave Cramer [EMAIL PROTECTED] writes: create function foo( out p1 int, in p2 int, out p3 int) then a subsequent {call = select foo(?,?,?)} This would need to be currently transformed into select foo(?), with the other two being discarded. It seems to me that the bind message

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Tom Lane
Junaili Lie [EMAIL PROTECTED] writes: I am running postgresql 7.4.8 on solaris 10 (and I compile and installed slony). Everytime I am trying to reload the configuration using pg_ctl reload -D $PGDATA, it deleted the postmaster.pid and didn't create a new one. That's very strange. The pg_ctl

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Dave Cramer
Ok, then I guess the documentation needs to indicate that. Or the version I am reading is not up to date. Dave Tom Lane wrote: Dave Cramer [EMAIL PROTECTED] writes: On a related note, drop function needs to support the in/out direction. It does ... do you see a

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Dave Cramer
At this point I'd just like the backend to ignore the OUT parameter if it were set that way, but allow it to be sent. If you consider that a function could have for arguments sake 10 parameters, and they can be ordered in any fashion; clients have to essentially parse out the OUT parameters

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Josh Berkus
Tom, How would it help for BIND to incorporate direction? What would it even *mean* for BIND to incorporate direction --- it's a client-to-server message, and can hardly be expected to transmit data in the reverse direction. Where directionality comes in is with OUT-only parameters.

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Josh Berkus
Folks, I am running postgresql 7.4.8 on solaris 10 (and I compile and installed slony). Everytime I am trying to reload the configuration using pg_ctl reload -D $PGDATA, it deleted the postmaster.pid and didn't create a new one. So, after reload, the only way I can restart the

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Tom Lane
Dave Cramer [EMAIL PROTECTED] writes: At this point I'd just like the backend to ignore the OUT parameter if it were set that way, but allow it to be sent. I think you're thinking at the wrong level. AIUI the issue occurs at the Parse stage, long before any parameter value is sent (or not

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Tom Lane
Josh Berkus josh@agliodbs.com writes: Looking at his report, what's happening is that the postmaster is shutting down, but the other backends are not ... they're hanging around as zombies. The zombies couldn't be dead backends if the postmaster has gone away: in every Unix I know, a zombie

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Tom Lane
Dave Cramer [EMAIL PROTECTED] writes: Ok, then I guess the documentation needs to indicate that. Or the version I am reading is not up to date. Oh, you're right, I overlooked adding that to the documentation of the other statement types that work with function names. Come to think of it, the

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Josh Berkus
Tom, The zombies couldn't be dead backends if the postmaster has gone away: in every Unix I know, a zombie process disappears instantly if its parent dies (since the only reason for a zombie in the first place is to hold the process' exit status until the parent reads it with wait()). yeah,

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Junaili Lie
Hi, Thank you all for the respond. I should probably mentioned that postgres is maintained by smf, which is a service management tool in solaris 10. I asked our sys admin to remove postgres from being managed by smf. he did that. But right now he is having problem because the system could not

[HACKERS] soundex and metaphone

2005-05-24 Thread Jonah H. Harris
Hey everyone, I've been working with a couple people who didn't know that soundex and metaphone were included in the distribution as contrib modules. While it's their fault that they didn't check contrib, soundex is pretty common among database systems and I was wondering if there was a

Re: [HACKERS] postmaster.pid disappeared

2005-05-24 Thread Junaili Lie
Tom, I am not too sure how to determine the unlink call. Can you provide more information/instructions? In my case the pg_ctl reload -D /usr/local/pgsql deleted the postmaster.pid without creating a new one. I am not too sure if this is normal. J On 5/24/05, Tom Lane [EMAIL PROTECTED] wrote:

Re: [HACKERS] IN/OUT parameters

2005-05-24 Thread Josh Berkus
People: OK, found it in SQL99: SQL parameter declaration ::= [ parameter mode ] [ SQL parameter name ] parameter type [ RESULT ] parameter mode ::= IN | OUT | INOUT ... so this is something we need to support, apparently both for Functions and Procedures (when we get the latter), in the

Re: [HACKERS] Speeding up the Postgres lexer

2005-05-24 Thread Neil Conway
Tom Lane wrote: Dunno. Depending on such a thing would require depending on a new flex version, and seeing that the flex guys haven't put out a new release since the badly broken 2.5.31 more than 2 years ago, I wouldn't hold my breath waiting for one we can use. It should be easy enough to