Re: [HACKERS] 9.5 feature count

2015-08-28 Thread Simon Riggs
On 27 August 2015 at 23:20, Bruce Momjian br...@momjian.us wrote: On Fri, Jun 26, 2015 at 11:13:19AM -0700, Peter Geoghegan wrote: On Fri, Jun 26, 2015 at 11:09 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Maybe there's a reasonable way to measure releases (my 8.0 is bigger than

Re: [HACKERS] [BUGS] Compile fails on AIX 6.1

2015-08-28 Thread Noah Misch
On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote: the problem is that IBM's assembler doesn't understand the local symbol notation supported by the GNU assembler (bne 1f referencing the next occurrence of 1:). So s_lock.h's PowerPC assembly code works if you have gcc configured to use

Re: [HACKERS] psql - better support pipe line

2015-08-28 Thread Shulgin, Oleksandr
On Fri, Aug 28, 2015 at 3:29 AM, Jim Nasby jim.na...@bluetreble.com wrote: On 8/27/15 8:37 AM, Pavel Stehule wrote: I don't think we can detect and remove the default values from this output in a reliable way? This is pretty difficult - any parameter can be important, and hard to

[HACKERS] Multi-column distinctness.

2015-08-28 Thread Kyotaro HORIGUCHI
Hello, this patch enables planner to be couscious of inter-column correlation. Sometimes two or more columns in a table has some correlation which brings underestimate, which leads to wrong join method and ends with slow execution. Tomas Vondra is now working on heavily-equipped multivariate

[HACKERS] Multiline-statement and multi-statement for pgbench custom script.

2015-08-28 Thread Kyotaro HORIGUCHI
Hi, this is a spin-off patch from Fabien COELHO's backslash-continuations. The major concept of this patch is making usage of psql's scanner to get rid of home-grown scanner of pgbench to make multi-statement feature available for pgbench custom scripts. This patch does the following things. -

Re: [HACKERS] patch: version_stamp.pl: Add Git commit info to version if 'git' is specified

2015-08-28 Thread Fabien COELHO
I've done the same using the output $(git describe --tags --dirty) - which will return something like REL9_5_ALPHA1-330-g8a7d070-dirty. Looks good! That's still not perfect considering plpgsql and such, ISTM That even for plpgsql it could be done, the stamp can be generated when the

[HACKERS] NOTIFY in Background Worker

2015-08-28 Thread jacques klein
Hello, I added a NOFITY chan to the SQL arg of an SPI_execute(), (I did it also with just the NOTIFY statement), but the listeners (other workers) don't get the notification until a NOTIFY chan is done for example with pgadmin, They don't get lost, just not emited after the not forgotten call of

Re: [HACKERS] patch: version_stamp.pl: Add Git commit info to version if 'git' is specified

2015-08-28 Thread Andres Freund
On 2015-08-28 07:48:28 +0200, Fabien COELHO wrote: Salesforce did something similar in their internal build, and TBH I do not find it a good idea. The basic problem is it's completely misleading to equate the last commit with the source you actually built from, because that might not have

Re: [HACKERS] Minor code improvements to create_foreignscan_plan/ExecInitForeignScan

2015-08-28 Thread Etsuro Fujita
On 2015/07/22 15:25, Etsuro Fujita wrote: On 2015/07/10 21:59, David Rowley wrote: On 10 July 2015 at 21:40, Etsuro Fujita fujita.ets...@lab.ntt.co.jp mailto:fujita.ets...@lab.ntt.co.jp wrote: To save cycles, I modified create_foreignscan_plan so that it detects whether any system

Re: [HACKERS] AcquireRewriteLocks/acquireLocksOnSubLinks vs. rowsecurity

2015-08-28 Thread Stephen Frost
* Dean Rasheed (dean.a.rash...@gmail.com) wrote: On 27 August 2015 at 13:49, Andres Freund and...@anarazel.de wrote: The locking around rowsecurity policy expressions seems to be insufficient: SELECT * FROM document WHERE f_leak(dtitle) ORDER BY did; WARNING:

Re: [HACKERS] AcquireRewriteLocks/acquireLocksOnSubLinks vs. rowsecurity

2015-08-28 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-08-28 08:49:24 -0400, Stephen Frost wrote: + /* +* get_row_security_policies just added to securityQuals and/or +* withCheckOptions, and there were

Re: [HACKERS] AcquireRewriteLocks/acquireLocksOnSubLinks vs. rowsecurity

2015-08-28 Thread Andres Freund
On 2015-08-28 08:49:24 -0400, Stephen Frost wrote: + /* + * get_row_security_policies just added to securityQuals and/or + * withCheckOptions, and there were SubLinks, so make sure +

Re: [HACKERS] [BUGS] Compile fails on AIX 6.1

2015-08-28 Thread Tom Lane
Noah Misch n...@leadboat.com writes: On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote: the problem is that IBM's assembler doesn't understand the local symbol notation supported by the GNU assembler (bne 1f referencing the next occurrence of 1:). So s_lock.h's PowerPC assembly code

Re: [HACKERS] AcquireRewriteLocks/acquireLocksOnSubLinks vs. rowsecurity

2015-08-28 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-08-28 08:49:24 -0400, Stephen Frost wrote: + /* +* get_row_security_policies just added to securityQuals and/or +* withCheckOptions, and there were

Re: [HACKERS] AcquireRewriteLocks/acquireLocksOnSubLinks vs. rowsecurity

2015-08-28 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: On 2015-08-28 08:49:24 -0400, Stephen Frost wrote: + /* +* get_row_security_policies just added to securityQuals and/or +* withCheckOptions, and there were

Re: [HACKERS] One question about security label command

2015-08-28 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/25/2015 06:54 PM, Joe Conway wrote: On 08/25/2015 06:03 PM, Joe Conway wrote: I'm arriving late to this party, so maybe everyone else already knows this, but apparently sepgsql is not compatible with the version of selinux available on

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Andres Freund
On 2015-08-28 12:32:45 -0300, Alvaro Herrera wrote: YUriy Zhuravlev wrote: Hello Hackers How would you react if I provided a patch which introduces a CMake build system? What's your motivation for doing so? I definitely can see some advantages. Non-broken dependencies around

Re: [HACKERS] What does RIR as in fireRIRrules stand for?

2015-08-28 Thread Andres Freund
On 2015-08-27 11:12:42 -0400, Tom Lane wrote: Steve Crawford scrawf...@pinpointresearch.com writes: Candidate for Appendix K? Meh ... it's not a user-visible notation, in fact it only appears in rewriteHandler.c AFAICS. Agreed, I don't think we want to distribute that term any wider than

Re: [HACKERS] What does RIR as in fireRIRrules stand for?

2015-08-28 Thread Tom Lane
Andres Freund and...@anarazel.de writes: On 2015-08-27 11:12:42 -0400, Tom Lane wrote: I think an explanation in fireRIRrules' header comment would be fine. I was thinking of adding it to the file's header like * NOTES * Some of the terms used in this file are of historic nature:

[HACKERS] Define two factor authentication for Postgresql Server

2015-08-28 Thread Nima Azizzadeh
Hello, I'm going to create two factor authentication for pgadmin server... I'm using postgresql 9.4 with pgadmin III on Linux Mint 17.2 32bit... I already have 1 password authentication but For better security, I just want to force 2 of them. The authentication factors could be any things(what

Re: [HACKERS] What does RIR as in fireRIRrules stand for?

2015-08-28 Thread Andres Freund
On 2015-08-28 10:20:58 -0400, Tom Lane wrote: Seems reasonable. Maybe worth writing out the modern spelling a bit further, an ON SELECT DO INSTEAD SELECT rule, to make the parallel to Retrieve-Instead-Retrieve perfectly clear. Makes sense. Pushed that way. Thanks -- Sent via pgsql-hackers

[HACKERS] WIP: About CMake v2

2015-08-28 Thread YUriy Zhuravlev
Hello Hackers How would you react if I provided a patch which introduces a CMake build system? Old thread: http://www.postgresql.org/message-id/200812291325.13354.pete...@gmx.net The main argument against the it's too hard. I'm right? Thanks! -- YUriy Zhuravlev Postgres Professional:

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Alvaro Herrera
YUriy Zhuravlev wrote: Hello Hackers How would you react if I provided a patch which introduces a CMake build system? What's your motivation for doing so? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services --

[HACKERS] Pg_upgrade remote copy

2015-08-28 Thread AI Rumman
Hi, In pg_upgrade, how about adding a feature to copy data directory over network. That is, we can run pg_upgrade from our new host, where old host will be a remote machine. We can add two parameters - oldhost and if it is used, pg_upgrade will identify the old host as remote and instead of local

Re: [HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2015-08-28 Thread Jim Nasby
On 8/28/15 8:39 PM, Tom Lane wrote: Michael Paquier michael.paqu...@gmail.com writes: On Sat, Aug 29, 2015 at 5:02 AM, Jim Nasby jim.na...@bluetreble.com wrote: Looks like a 98k file won't get through the list... Is it compressed? Note that we have sometimes larger patches than that, but

Re: [HACKERS] One question about security label command

2015-08-28 Thread Adam Brightwell
* It is really the version of libselinux.so that matters here. RHEL 7.x has libselinux 2.2.x whereas RHEL 6.x has 2.0.x. The latter lacks functionality required by sepgsql starting with PG 9.2. Yes, that has been my observation as well. So given all that, here is what I propose we do: 1.)

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Pavel Stehule
2015-08-28 22:31 GMT+02:00 David G. Johnston david.g.johns...@gmail.com: On Fri, Aug 28, 2015 at 4:18 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-08-28 22:07 GMT+02:00 Jim Nasby jim.na...@bluetreble.com: On 8/26/15 8:15 AM, Pavel Stehule wrote: + and then exit. This is

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Pavel Stehule
2015-08-28 23:01 GMT+02:00 Jim Nasby jim.na...@bluetreble.com: On 8/28/15 3:31 PM, David G. Johnston wrote: --psqlrc​ ​; read the standard rc files​ --no-psqlrc ; do not read the standard rc files It belongs in a separate patch, though. In this patch -g should disable the reading of the

Re: [HACKERS] [BUGS] Compile fails on AIX 6.1

2015-08-28 Thread Noah Misch
On Fri, Aug 28, 2015 at 09:58:46AM -0400, Tom Lane wrote: Noah Misch n...@leadboat.com writes: On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote: So s_lock.h's PowerPC assembly code works if you have gcc configured to use gas as backend, but not if it's configured to use the native

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Gianni
On Friday 28 August 2015 13:28:49 Alvaro Herrera wrote: Andres Freund wrote: On 2015-08-28 12:32:45 -0300, Alvaro Herrera wrote: YUriy Zhuravlev wrote: Hello Hackers How would you react if I provided a patch which introduces a CMake build system? What's your

Re: [HACKERS] [patch] Proposal for \rotate in psql

2015-08-28 Thread Pavel Stehule
2015-08-29 0:48 GMT+02:00 Daniel Verite dan...@manitou-mail.org: Hi, This is a reboot of my previous proposal for pivoting results in psql, with a new patch that generalizes the idea further through a command now named \rotate, and some examples. So the concept is: having an existing

Re: [HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2015-08-28 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Sat, Aug 29, 2015 at 5:02 AM, Jim Nasby jim.na...@bluetreble.com wrote: Looks like a 98k file won't get through the list... Is it compressed? Note that we have sometimes larger patches than that, but perhaps those had special permissions by

Re: [HACKERS] NOTIFY in Background Worker

2015-08-28 Thread Thomas Munro
On Sat, Aug 29, 2015 at 9:03 AM, Thomas Munro thomas.mu...@enterprisedb.com wrote: On Fri, Aug 28, 2015 at 10:30 PM, jacques klein jacques.k...@googlemail.com wrote: Hello, I added a NOFITY chan to the SQL arg of an SPI_execute(), (I did it also with just the NOTIFY statement), but the

Re: [HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2015-08-28 Thread Michael Paquier
On Sat, Aug 29, 2015 at 11:18 AM, Jim Nasby jim.na...@bluetreble.com wrote: On 8/28/15 8:39 PM, Tom Lane wrote: Michael Paquier michael.paqu...@gmail.com writes: On Sat, Aug 29, 2015 at 5:02 AM, Jim Nasby jim.na...@bluetreble.com wrote: Looks like a 98k file won't get through the list...

Re: [HACKERS] Proposal: Implement failover on libpq connect level.

2015-08-28 Thread Teodor Sigaev
+1 for bringing the jdbc driver URI syntax into libpq, so that all interfaces can be optionally specified this way. This doesn't preclude the use of ipfailover, in fact it might be work well together. If you don't like it, don't use it. +1 Another thought: multiple hosts in URI could be used

Re: [HACKERS] patch: version_stamp.pl: Add Git commit info to version if 'git' is specified

2015-08-28 Thread Jeff Janes
On Fri, Aug 28, 2015 at 1:44 AM, Andres Freund and...@anarazel.de wrote: On 2015-08-28 07:48:28 +0200, Fabien COELHO wrote: Salesforce did something similar in their internal build, and TBH I do not find it a good idea. The basic problem is it's completely misleading to equate the last

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Alvaro Herrera
Andres Freund wrote: On 2015-08-28 12:32:45 -0300, Alvaro Herrera wrote: YUriy Zhuravlev wrote: Hello Hackers How would you react if I provided a patch which introduces a CMake build system? What's your motivation for doing so? I definitely can see some advantages.

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Andres Freund
On 2015-08-28 13:28:49 -0300, Alvaro Herrera wrote: the other is how ugly the generated files are going to be, and are we going to carry them in our repo -- right now we only have configure, but are we going to keep extra files to cope with builds in systems that don't have cmake installed (as

Re: [HACKERS] patch: version_stamp.pl: Add Git commit info to version if 'git' is specified

2015-08-28 Thread Andres Freund
On 2015-08-28 09:13:59 -0700, Jeff Janes wrote: On Fri, Aug 28, 2015 at 1:44 AM, Andres Freund and...@anarazel.de wrote: I've done the same using the output $(git describe --tags --dirty) - which will return something like REL9_5_ALPHA1-330-g8a7d070-dirty. That is, the last tag, the number

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: I wonder about two other things: one is speed of the build (not that currently it's all that great, given all the mess with recursive make invocations, but perhaps it can be even worse); the other is how ugly the generated files are going to be,

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Christopher Browne
It's broadly interesting, but since it bakes in a build dependency on CMake, there is some risk that the dependencies become an insurmountable problem. (Does CMake run on a VAX 11/780?? :-)) It is probably worth a try, to see what improvements arise, albeit with the need to accept some risk of

Re: [HACKERS] WIP: About CMake v2

2015-08-28 Thread Tom Lane
Christopher Browne cbbro...@gmail.com writes: (Does CMake run on a VAX 11/780?? :-)) Yeah. I see the two major risks as being: 1. We limit ourselves to platforms that cmake works on. 2. We lose the ability to handle weird special-case tests that are possible (if not necessarily pleasant)

Re: [HACKERS] [BUGS] Compile fails on AIX 6.1

2015-08-28 Thread Tom Lane
I wrote: Noah Misch n...@leadboat.com writes: On Thu, Aug 27, 2015 at 10:36:46AM -0400, Tom Lane wrote: 2. Don't rely on local symbols in the PPC spinlock assembly code. A third option is to use __sync intrinsics, like we do on ARM. I like (2). I've been waiting to hear confirmation from

Re: [HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Fri, Aug 28, 2015 at 05:32:38PM -0400, Tom Lane wrote: Personally I find that truncated output to be pretty unreadable, and would strongly object to changing git_changelog so that that was the only possible format. However, I have no objection to

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-28 Thread Bruce Momjian
On Wed, Aug 5, 2015 at 03:46:36PM +0200, Andres Freund wrote: On 2015-08-05 15:08:29 +0200, Andres Freund wrote: We might later want to change some of the harder to maintain macros to inline functions, but that seems better done separately. Here's a conversion for fastgetattr() and

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-28 Thread Bruce Momjian
On Wed, Aug 12, 2015 at 04:47:55PM -0400, Robert Haas wrote: On Wed, Aug 12, 2015 at 4:34 PM, Heikki Linnakangas hlinn...@iki.fi wrote: Andres didn't mention how big the performance benefit he saw with pgbench was, but I bet it was barely distinguishible from noise. But that's OK. In fact,

Re: [HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Andres Freund
On 2015-08-28 17:49:35 -0400, Bruce Momjian wrote: If we _don't_ do that, how do you easily get those lines into the release notes? I can't imagine how hard it was for Andres to add that text to the 9.5 release notes: Formatting the log wasn't the hard part, that was finding out which item in

Re: [HACKERS] Raising our compiler requirements for 9.6

2015-08-28 Thread Bruce Momjian
On Wed, Aug 12, 2015 at 10:40:53PM +0200, Andres Freund wrote: You might argue that it's nothing we have touched frequently. And you're right. But I think that's a mistake. We spend far too much time in the various pieces of code dissembling tuples, and I think at some point somebody really

Re: [HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Bruce Momjian
On Sat, Aug 29, 2015 at 12:23:30AM +0200, Andres Freund wrote: On 2015-08-28 17:49:35 -0400, Bruce Momjian wrote: If we _don't_ do that, how do you easily get those lines into the release notes? I can't imagine how hard it was for Andres to add that text to the 9.5 release notes:

Re: [HACKERS] [BUGS] Compile fails on AIX 6.1

2015-08-28 Thread Tom Lane
I wrote: ... that assembler likes $ for current location. I did a quick check on my oldest OS X PPC box, and it seems to be happy with $ as well, so maybe we can use that --- though I see nothing about $ in the GNU Assembler manual, which makes me a bit worried about whether it works on all

[HACKERS] [patch] Proposal for \rotate in psql

2015-08-28 Thread Daniel Verite
Hi, This is a reboot of my previous proposal for pivoting results in psql, with a new patch that generalizes the idea further through a command now named \rotate, and some examples. So the concept is: having an existing query in the query buffer, the user can specify two column numbers C1 and

Re: [HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2015-08-28 Thread Michael Paquier
On Sat, Aug 29, 2015 at 5:02 AM, Jim Nasby jim.na...@bluetreble.com wrote: Looks like a 98k file won't get through the list... Is it compressed? Note that we have sometimes larger patches than that, but perhaps those had special permissions by the admins of this list. -- Michael

Re: [HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Alvaro Herrera
Bruce Momjian wrote: To simplify the creation of the release note with the commit tag as an SGML comment, I think src/tools/git_changelog should be modified to output this string. The format trunc feature was added in git 1.8.3. Is that old enough for everyone? Hmm, that's pretty new

Re: [HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Tom Lane
Alvaro Herrera alvhe...@2ndquadrant.com writes: Bruce Momjian wrote: To simplify the creation of the release note with the commit tag as an SGML comment, I think src/tools/git_changelog should be modified to output this string. The format trunc feature was added in git 1.8.3. Is that old

Re: [HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Bruce Momjian
On Fri, Aug 28, 2015 at 05:32:38PM -0400, Tom Lane wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Bruce Momjian wrote: To simplify the creation of the release note with the commit tag as an SGML comment, I think src/tools/git_changelog should be modified to output this string.

Re: [HACKERS] Function accepting array of complex type

2015-08-28 Thread Tom Lane
Jim Nasby jim.na...@bluetreble.com writes: On 8/25/15 6:28 PM, Tom Lane wrote: You need to cast it to some specific record type: regression=# SELECT magsum( array[row(2.1, 2.1), row(2.2,2.2)]::c[] ); Right, I was wondering how hard it would be to improve that, but it's not clear to me where

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Jim Nasby
On 8/28/15 3:31 PM, David G. Johnston wrote: --psqlrc​ ​; read the standard rc files​ --no-psqlrc ; do not read the standard rc files It belongs in a separate patch, though. In this patch -g should disable the reading of the standard rc files. Agreed; I didn't realize -c disabled psqlrc.

Re: [HACKERS] NOTIFY in Background Worker

2015-08-28 Thread Thomas Munro
On Fri, Aug 28, 2015 at 10:30 PM, jacques klein jacques.k...@googlemail.com wrote: Hello, I added a NOFITY chan to the SQL arg of an SPI_execute(), (I did it also with just the NOTIFY statement), but the listeners (other workers) don't get the notification until a NOTIFY chan is done for

[HACKERS] Adding commit details to SGML release notes

2015-08-28 Thread Bruce Momjian
On Tue, Jun 30, 2015 at 07:00:45PM +, Andres Freund wrote: Improve 9.5 release notes. 1) Add sgml comments referencing commits. This is useful to search for missing items etc. The comments containing the commit notes are an excerpt from: git log --date=short \

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread David G. Johnston
On Fri, Aug 28, 2015 at 4:07 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 8/26/15 8:15 AM, Pavel Stehule wrote: + and then exit. This is useful in shell scripts. Start-up files + (filenamepsqlrc/filename and filename~/.psqlrc/filename) are + ignored with this option.

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Pavel Stehule
2015-08-28 22:07 GMT+02:00 Jim Nasby jim.na...@bluetreble.com: On 8/26/15 8:15 AM, Pavel Stehule wrote: + and then exit. This is useful in shell scripts. Start-up files + (filenamepsqlrc/filename and filename~/.psqlrc/filename) are + ignored with this option. Sorry if this

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread David G. Johnston
On Fri, Aug 28, 2015 at 4:18 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2015-08-28 22:07 GMT+02:00 Jim Nasby jim.na...@bluetreble.com: On 8/26/15 8:15 AM, Pavel Stehule wrote: + and then exit. This is useful in shell scripts. Start-up files + (filenamepsqlrc/filename and

Re: [HACKERS] psql - better support pipe line

2015-08-28 Thread Jim Nasby
On 8/28/15 3:58 AM, Shulgin, Oleksandr wrote: It occurs to me the most flexible thing that could be done here would be providing a libpq function that spits out JSON connection parameters and have psql turn that into a variable. It would be easy to feed that to a SQL statement

Re: [HACKERS] Function accepting array of complex type

2015-08-28 Thread Jim Nasby
On 8/25/15 6:28 PM, Tom Lane wrote: Jim Nasby jim.na...@bluetreble.com writes: This works: CREATE TYPE c AS (r float, i float); CREATE FUNCTION mag(c c) RETURNS float LANGUAGE sql AS $$ SELECT sqrt(c.r^2 + c.i^2) $$; SELECT mag( (2.2, 2.2) ); mag -- 3.11126983722081

Re: [HACKERS] proposal: multiple psql option -c

2015-08-28 Thread Jim Nasby
On 8/26/15 8:15 AM, Pavel Stehule wrote: + and then exit. This is useful in shell scripts. Start-up files + (filenamepsqlrc/filename and filename~/.psqlrc/filename) are + ignored with this option. Sorry if this was discussed and I missed it, but I think this is a bad idea.

[HACKERS] Fwd: Core dump with nested CREATE TEMP TABLE

2015-08-28 Thread Jim Nasby
Looks like a 98k file won't get through the list... Forwarded Message Subject: Core dump with nested CREATE TEMP TABLE Date: Thu, 27 Aug 2015 19:45:12 -0500 From: Jim Nasby jim.na...@bluetreble.com To: Pg Hackers pgsql-hackers@postgresql.org I don't have an independent