Re: [HACKERS] plpgsql NULL statement (was Re: [GENERAL] Postgres

2004-08-16 Thread Dennis Bjorklund
On Mon, 16 Aug 2004, Tom Lane wrote: in oracle it's WHEN OTHERS THEN null; but this syntax doesn't work in postgres. It looks like about five minutes' work to add such a thing ... anyone have any objections? Is NULL above an empty statement in oracle or is it a normal expression (the

Re: [HACKERS] to_char() and negative intervals

2004-08-16 Thread Karel Zak
On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Someone on IRC just reported this to_char() failure with negative intervals: I think Karel wanted to remove to_char(interval) altogether. Yes, the notice about it is already in 7.4 docs.

Re: [HACKERS] plpgsql NULL statement (was Re: [GENERAL] Postgres

2004-08-16 Thread Tom Lane
Dennis Bjorklund [EMAIL PROTECTED] writes: Is NULL above an empty statement in oracle or is it a normal expression It's an actual empty statement. (the normal NULL value) so that the above is a shorthand for WHEN OTHERS THEN SELECT NULL; Even if it were, the point here is to accept

Re: [HACKERS] to_char() and negative intervals

2004-08-16 Thread Bruce Momjian
Karel Zak wrote: On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Someone on IRC just reported this to_char() failure with negative intervals: I think Karel wanted to remove to_char(interval) altogether. Yes, the notice about it is

[HACKERS] COPY with column headings

2004-08-16 Thread Bruce Momjian
Someone just asked about a COPY capability to supply the column headings as the first line of the copy statement. Do we want to support something like that? Does anyone else want such functionality? -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Someone just asked about a COPY capability to supply the column headings as the first line of the copy statement. Do we want to support something like that? No. Tell him to use SELECT. (Such a capability would be a permanent hazard, because any time

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Jeroen T. Vermeulen
On Mon, Aug 16, 2004 at 10:53:36AM -0400, Bruce Momjian wrote: Someone just asked about a COPY capability to supply the column headings as the first line of the copy statement. Do we want to support something like that? Does anyone else want such functionality? Wouldn't it be more logical,

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Andrew Dunstan
Bruce Momjian wrote: Someone just asked about a COPY capability to supply the column headings as the first line of the copy statement. Do we want to support something like that? Does anyone else want such functionality? I had it in mind all along as a possible option for CSV mode, but given

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Bruce Momjian
Andrew Dunstan wrote: Bruce Momjian wrote: Someone just asked about a COPY capability to supply the column headings as the first line of the copy statement. Do we want to support something like that? Does anyone else want such functionality? I had it in mind all along as a

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Tom Lane
Jeroen T. Vermeulen [EMAIL PROTECTED] writes: Wouldn't it be more logical, and more compatible, to keep this information as regular column information in the PGresult returned by the COPY? That would work but would require a protocol change, which this is surely not worth by itself. (We could

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Jeroen T. Vermeulen
On Mon, Aug 16, 2004 at 11:30:49AM -0400, Tom Lane wrote: The bigger question is whether this would do anything to satisfy the requestor. He probably wants the headings to appear in the file resulting from COPY TO file (or the psql equivalent), which this would not do. Providing the info in

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: I certainly think it's worth considering, although I see Tom has objected :-) . Say we have an option called FIRSTLINELABELS, then on copy out it would write the headings on the first line, and on copy in it could just ignore the first line (so it

HASHes [was Re: [HACKERS] Calling PL functions with named parameters]

2004-08-16 Thread David Fetter
On Fri, Aug 13, 2004 at 07:12:14PM -0400, Tom Lane wrote: Jim C. Nasby [EMAIL PROTECTED] writes: IOW, their function resolution code treats a(int, int default 0) as being equivalent to a(int) and a(int, int). So you are willing to prohibit a(int) from existing in parallel with a(int,

Re: HASHes [was Re: [HACKERS] Calling PL functions with named parameters]

2004-08-16 Thread Tom Lane
David Fetter [EMAIL PROTECTED] writes: What about making HASHes a first-class object? I see less than zero value in this. You'd have to serialize the contents to ship it to the client anyway, so there is no particular point in inventing a random new representation for row.

Re: [HACKERS] pg_subtrans and WAL

2004-08-16 Thread Bruce Momjian
Added to open items: * determine proper crash recovery/logging for pg_subtrans --- Alvaro Herrera Munoz wrote: On Tue, Aug 10, 2004 at 12:24:06PM -0400, Tom Lane wrote: My discovery last night of a WAL

Re: [HACKERS] Tablespace issues (comment on ,moving indexes)

2004-08-16 Thread Bruce Momjian
Added to TODO; o Add ALTER INDEX syntax to work like ALTER TABLE indexname --- Christopher Kings-Lynne wrote: What I mean here is that I think it would be in our best interests to define the syntax for any new

Re: [HACKERS] Calling PL functions with named parameters

2004-08-16 Thread Josh Berkus
Tom, I agree however with Andrew's nearby point that this is completely unrelated to named parameters to functions/procedures, or to defaults for parameters. I think that was Peter's point, not Andrew's.Andrew agreed with me. I do think, though, that we should hammer out the parameters,

Re: [HACKERS] Calling PL functions with named parameters

2004-08-16 Thread Tom Lane
Josh Berkus [EMAIL PROTECTED] writes: Tom, just to be perfectly clear about why I see Procedures as a way of resolving parameter ambiguity, my idea is that: FUNCTIONS will support overloading but will not support named parameter calling; PROCEDURES will support named parameter calling but

Re: [HACKERS] Open items

2004-08-16 Thread Magnus Hagander
Does anyone have any more? win32 signal safe socket handler I thought that was solved long ago? If this is what I think it is (Merlin - please confirm), this relates to the SSL code only. And the issue is that there are (I think - haven't 100% verified it yet) paths in the SSL code that will

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-16 Thread Magnus Hagander
That's ugly, and unfortunately %z is GNU-specific. Does Windows' strftime have any short zone name %-spec? Seems like a quick #ifdef WIN32 to use a more compact zone name would be the best solution. No. This is what the cruft in pgtz.c (TZABBREV macro and associated function) was all about.

Re: [HACKERS] Timezone for %t log_line_prefix

2004-08-16 Thread Magnus Hagander
Since we do have control over the timezone library now, one possible answer is to extend the src/timezone API so that it's possible to convert/format against more than a single timezone. We could then remember the zone setting inherited from the postmaster and always use that when formatting

Re: [HACKERS] Open items

2004-08-16 Thread Bruce Momjian
Magnus Hagander wrote: Does anyone have any more? win32 signal safe socket handler I thought that was solved long ago? If this is what I think it is (Merlin - please confirm), this relates to the SSL code only. And the issue is that there are (I think - haven't 100% verified it yet)

Re: [HACKERS] Open items

2004-08-16 Thread Merlin Moncure
Sorry for the late reply, missed your initial response. Merlin Moncure [EMAIL PROTECTED] writes: Does anyone have any more? win32 signal safe socket handler I thought that was solved long ago? As magnus wrote, we need to confirm that ssl sockets don't block singals while waiting or

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Andrew Dunstan
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: I certainly think it's worth considering, although I see Tom has objected :-) . Say we have an option called FIRSTLINELABELS, then on copy out it would write the headings on the first line, and on copy in it could just ignore the first

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: The use case is that it fits in with the way spreadsheets usually do data tables, and many will only allow you to export a whole worksheet (including the heading row) to CSV, not a part of one. Conversely, working with imported data

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Dann Corbit
Might be worthwhile to look at SQL*Server BCP format files: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsq l/ad_impt_bcp_9yat.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref /ts_ba-bz_4fec.asp A TCL/TK front end would be especially nice. Of

Re: [HACKERS] COPY with column headings

2004-08-16 Thread Bruce Momjian
Tom Lane wrote: Andrew Dunstan [EMAIL PROTECTED] writes: The use case is that it fits in with the way spreadsheets usually do data tables, and many will only allow you to export a whole worksheet (including the heading row) to CSV, not a part of one. Conversely, working with imported

Re: [HACKERS] [ADMIN] SRPM for 8.0.0 beta?

2004-08-16 Thread Joe Conway
Joe Conway wrote: Steve Bergman wrote: Anyone have an SRPM of spec file for the beta? I just created and posted a source RPM for 8.0.0beta1. As I'm not the usual packager, and a pure hack when it comes to building my own RPMs, it would be a Good Thing(tm) if someone else could vet this package;

Re: [HACKERS] [ADMIN] Pseudo-Off-topic-survey: Opinions about future of Postgresql(MySQL)?

2004-08-16 Thread Shahbaz Javeed
# This message was accidentally sent only to Bruce. It's pasted here for comment from the rest of the list too :) Folks, While on the topic of Ingres and open source, I was wondering whether there's interest in an effort to port some of the enterprise-grade features from Ingres over to Postgres

[HACKERS] OT: Want to blog on PostgreSQL.org?

2004-08-16 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Many hackers worked for PostgreSQL 8.0.0 release, which was one of the most active development period of PostgreSQL history. We got too many contributors for this release which is a great success, I think. A lot of other OSS projects seem to

Re: [HACKERS] Tablespace issues (comment on ,moving indexes)

2004-08-16 Thread Gavin Sherry
I posted a patch for this last Friday 13th. Gavin On Mon, 16 Aug 2004, Bruce Momjian wrote: Added to TODO; o Add ALTER INDEX syntax to work like ALTER TABLE indexname --- Christopher Kings-Lynne wrote:

[HACKERS] pulling projection up in plans

2004-08-16 Thread Hicham G. Elmongui
Hi, is there a way to pull the projection operator to the top of the query plan? I wish there's a variable that can be set to do so. Thanks, --h ---(end of broadcast)--- TIP 6: Have you searched our list archives?

Re: [HACKERS] to_char() and negative intervals

2004-08-16 Thread Alvaro Herrera
On Mon, Aug 16, 2004 at 10:43:10AM -0400, Bruce Momjian wrote: Karel Zak wrote: On Fri, Aug 13, 2004 at 12:24:28PM -0400, Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Someone on IRC just reported this to_char() failure with negative intervals: I think Karel wanted

Re: [HACKERS] Calling PL functions with named parameters

2004-08-16 Thread Josh Berkus
Tom, Understood, but this seems like a bad design to me, because it's non-orthogonal. Or just a natural consequence of our having loaded Functions down with all of the functionality usually assigned to Procedures over the years. I think that named params would have no significant extra cost

Re: [HACKERS] to_char() and negative intervals

2004-08-16 Thread Bruce Momjian
Added to open items: * remove to_char(interval) if we initdb --- Alvaro Herrera wrote: On Mon, Aug 16, 2004 at 10:43:10AM -0400, Bruce Momjian wrote: Karel Zak wrote: On Fri, Aug 13, 2004 at 12:24:28PM

Re: [HACKERS] pulling projection up in plans

2004-08-16 Thread Tom Lane
Hicham G. Elmongui [EMAIL PROTECTED] writes: is there a way to pull the projection operator to the top of the query plan? I wish there's a variable that can be set to do so. Could you be more specific about what you're hoping to accomplish? regards, tom lane

Re: [HACKERS] OT: Want to blog on PostgreSQL.org?

2004-08-16 Thread Marc G. Fournier
On Tue, 17 Aug 2004, Devrim GUNDUZ wrote: stupid question, but what *is* a blog? Hi, Many hackers worked for PostgreSQL 8.0.0 release, which was one of the most active development period of PostgreSQL history. We got too many contributors for this release which is a great success, I think. A lot

Re: [HACKERS] OT: Want to blog on PostgreSQL.org?

2004-08-16 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, 16 Aug 2004, Marc G. Fournier wrote: stupid question, but what *is* a blog? http://dotnet.org.za/armand/archive/0001/01/01/1172.aspx A blog is basically a journal that is available on the web. The activity of updating a blog is

Re: [HACKERS] pulling projection up in plans

2004-08-16 Thread Sailesh Krishnamurthy
Tom == Tom Lane [EMAIL PROTECTED] writes: Tom Hicham G. Elmongui [EMAIL PROTECTED] writes: is there a way to pull the projection operator to the top of the query plan? I wish there's a variable that can be set to do so. Tom Could you be more specific about what you're

Re: [HACKERS] Release notes for upgrading

2004-08-16 Thread Marc G. Fournier
On Wed, 11 Aug 2004, Robert Treat wrote: On Wed, 2004-08-11 at 01:11, Tom Lane wrote: Robert Treat [EMAIL PROTECTED] writes: On Tuesday 10 August 2004 22:57, Christopher Kings-Lynne wrote: I don't think many users realise they can use the next version's pg_dump to upgrade. I think it should be

Re: [HACKERS] COPY with column headings

2004-08-16 Thread CSN
That'd likely be useful. Either specify the column names with COPY or \copy, or put them in the data file and pass an option to the command to look for them. The only time this could be a problem is if you forget to tell COPY to look for the field names in the file (AND specify the field names to