Re: [HACKERS] Function result cacheing - any comments?

2002-08-18 Thread Christopher Kings-Lynne
> What Philip seems to be asking for is a mechanism where by if a function > is marked as being mathematically deterministic (given a particular set of > parameters the same result is always returned -- eg: cos(), sin(), > etc) then the result is cached and next time the function is called with >

Re: [HACKERS] Function result cacheing - any comments?

2002-08-18 Thread Gavin Sherry
On Sun, 18 Aug 2002, Joe Conway wrote: > Philip Warner wrote: > > So the obvious question is - in the opinion of people who know the code, > > can a function-result-cache be implemented with a lifetime of a single > > statement, without butchering the function manager? > > > > I don't know if

Re: [HACKERS] set search_path failure

2002-08-18 Thread Tatsuo Ishii
> Try 'public','s1' perhaps... Wao, this is confusing:-) The man page says: SET variable { TO | = } { value | 'value' | DEFAULT } And: test=# show search_path; search_path - public, s1 (1 row) So user naturally thinks set search_path to 'public,s1'; is a correct synta

Re: [HACKERS] set search_path failure

2002-08-18 Thread Christopher Kings-Lynne
Try 'public','s1' perhaps... Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Tatsuo Ishii > Sent: Monday, 19 August 2002 2:31 PM > To: [EMAIL PROTECTED] > Subject: [HACKERS] set search_path failure > > > I'm seeing this: > > test=# create

[HACKERS] set search_path failure

2002-08-18 Thread Tatsuo Ishii
I'm seeing this: test=# create schema s1; CREATE SCHEMA test=# set search_path to 'public, s1'; ERROR: Namespace "public, s1" does not exist Am I missing something? -- Tatsuo Ishii ---(end of broadcast)--- TIP 5: Have you checked our extensive FA

Re: [HACKERS] Function result cacheing - any comments?

2002-08-18 Thread Philip Warner
At 22:29 18/08/2002 -0700, Joe Conway wrote: >create function get_manager_names() returns setof manager_names as > 'select d.id, p.name from departments d, people p > where p.id = d.manager_id' language sql; > >select p.name, m.name as boss from people p, get_manager_names() m where >p.d

Re: [HACKERS] Function result cacheing - any comments?

2002-08-18 Thread Joe Conway
Philip Warner wrote: > So the obvious question is - in the opinion of people who know the code, > can a function-result-cache be implemented with a lifetime of a single > statement, without butchering the function manager? > I don't know if I fully understand what you're proposing, but if I u

Re: Removing Libraries (Was: Re: [HACKERS] Open 7.3 issues)

2002-08-18 Thread Marc G. Fournier
On Sun, 18 Aug 2002, Peter Eisentraut wrote: > Marc G. Fournier writes: > > > Okay, here is what I'd like to suggest ... Bruce, let's start off really > > simple ... go create a project for libpq++ (I believe someone even > > volunteered to maintain it?) and let me know once created, and I'll mov

Re: [HACKERS] Function result cacheing - any comments?

2002-08-18 Thread Philip Warner
OK - I assume from everybody else's silence that they either (a) agree with the idea, or (b) think Tom hit the idea on the head, so they feel they don't need to respond. So what I would like to do is implement a simple version of this to attempt to justify my claims of performance gains. The

[HACKERS] TRUNCATE TODO Item

2002-08-18 Thread Rod Taylor
# Disallow TRUNCATE on tables that are involved in referential constraints The above is on the TODO list. Are there any thoughts as to what we want to do with this? The patch I submitted earlier received heavy feedback saying it wasn't wanted due to rules and triggers (foreign keys) being diffi

Re: [HACKERS] About to update the PostgreSQL Functions in the official PHP Manual

2002-08-18 Thread Christopher Kings-Lynne
There's a couple of new bytea encoding/decoding functions in libpq aren't there? Or at least there's one... Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Justin Clift > Sent: Monday, 19 August 2002 7:03 AM > To: PostgreSQL Hackers Mailing

[HACKERS] Ident nodetype considered harmful

2002-08-18 Thread Tom Lane
I've just noticed that a bunch of places use strVal() to access the name field of an Ident node. (Try changing strVal() to #define strVal(v)(AssertMacro(IsA(v, String)), ((Value *)(v))->val.str) and watch the fur fly...) This works, at the moment, because Ident and Value nodes have a s

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread ngpg
[EMAIL PROTECTED] (Tom Lane) wrote > * If a connection request has a username with a trailing '@' (and no > embedded '@'), then the '@' is stripped and connection proceeds. > > * Otherwise, '@dbname' is appended to the given username and > connection proceeds. > It might be worth recalling the

[HACKERS] About to update the PostgreSQL Functions in the official PHP Manual

2002-08-18 Thread Justin Clift
Hi everyone, Conni is the author of a German PostgreSQL book, and is also a member of the PHP documentation team. She's updating some parts of the official PHP manual at present, an she'll be up to the PostgreSQL section pretty soon. Does anyone have stuff they'd like to see included, etc? :-)

Re: [HACKERS] assigning to NULL?

2002-08-18 Thread Tom Lane
[EMAIL PROTECTED] writes: > I get: "ERROR: copyObject: don't know how to copy node type 506" This is a bug in someone's recent patch ... but you don't want to say "NULL=geopoint" anyway, do you? Surely it should be "geopoint IS NULL". regards, tom lane -

[HACKERS] assigning to NULL?

2002-08-18 Thread redmonde
I'm trying to make postGIS work with pg7.3devel. But a problem is occuring that did not appear in pg7.2. When I execute: ALTER TABLE geotest ADD CHECK ( geometrytype(geopoint)='POINT' OR NULL=geopoint); I get: "ERROR: copyObject: don't know how to copy node type 506" But when I execute: ALTER

Re: [PATCHES] [HACKERS] Better handling of parse errors

2002-08-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane writes: >> "Character 1" is correct as of the context that the parser is working >> in, namely the function body. I don't think we can do much to change >> that, but perhaps we could make the message read like >> ERROR: parser: parse error

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I'm completely lost between all the proposals about where the @ is going > to be specified, added, or removed. What happens on the client side and > what happens on the server side? Well, the way things stand as of CVS tip is that (assuming you have

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread Peter Eisentraut
Tom Lane writes: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > I'm concerned that we leave essentially no migration path, that is, the > > ability to turn the feature on to try it out without immediately breaking > > every application. > > Uh ... what? I fail to understand your objection.

Re: [PATCHES] [HACKERS] Better handling of parse errors

2002-08-18 Thread Peter Eisentraut
Tom Lane writes: > "Character 1" is correct as of the context that the parser is working > in, namely the function body. I don't think we can do much to change > that, but perhaps we could make the message read like > ERROR: parser: parse error at or near "not" at character 1 of function body

Re: Removing Libraries (Was: Re: [HACKERS] Open 7.3 issues)

2002-08-18 Thread Peter Eisentraut
Marc G. Fournier writes: > Okay, here is what I'd like to suggest ... Bruce, let's start off really > simple ... go create a project for libpq++ (I believe someone even > volunteered to maintain it?) and let me know once created, and I'll move > the CVS directory over for libpq++ and out of the p

Re: [PATCHES] [HACKERS] Better handling of parse errors

2002-08-18 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > Reworking the code to taken into account token_start seems to work. Yes, I did that last night ... regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Joe Conway
Rod Taylor wrote: >>>In MSSQL this >>>is gotten around by allowing the properties of the data type to be >>>altered, e.g. in MSSQL you can turn the IDENTITY property on or off >> >>Rather pointless if it can be turned off, wouldn't you say? >> >>What I would do if I wanted such a guarantee is to

Re: [HACKERS] Open 7.3 issues

2002-08-18 Thread Tom Lane
"Nigel J. Andrews" <[EMAIL PROTECTED]> writes: > Daft question but isn't this an administrator's issue? The feature wasn't going to change; the argument was just about whether to change the factory-default permissions mask for the socket. An admin could override the default in any case (and prob

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread Vince Vielhaber
On Sat, 17 Aug 2002, Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > OK, I think we are doing this backwards. Instead of adding '@' to > > global users, and then removing it in the backend, why don't we have > > local users end with '@', that way, global users continue to connect

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread Vince Vielhaber
On Sat, 17 Aug 2002, Bruce Momjian wrote: > > OK, I think we are doing this backwards. Instead of adding '@' to > global users, and then removing it in the backend, why don't we have > local users end with '@', that way, global users continue to connect > just as they have before, and local user

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Joe Conway
Tom Lane wrote: > Joe Conway <[EMAIL PROTECTED]> writes: >>In MSSQL this >>is gotten around by allowing the properties of the data type to be >>altered, e.g. in MSSQL you can turn the IDENTITY property on or off > > Rather pointless if it can be turned off, wouldn't you say? Not really. Turnin

Re: [PATCHES] [HACKERS] Better handling of parse errors

2002-08-18 Thread Gavin Sherry
On Sun, 18 Aug 2002, Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > In strings.sql: > > > -- illegal string continuation syntax > > SELECT 'first line' > > ' - next line' /* this comment is not allowed here */ > > ' - third line' > > AS "Illegal comment within continu

Re: [HACKERS] Remove implicit unique index creation on SERIAL

2002-08-18 Thread Rod Taylor
> > In MSSQL this > > is gotten around by allowing the properties of the data type to be > > altered, e.g. in MSSQL you can turn the IDENTITY property on or off > > Rather pointless if it can be turned off, wouldn't you say? > > What I would do if I wanted such a guarantee is to make insertion

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I'm concerned that we leave essentially no migration path, that is, the > ability to turn the feature on to try it out without immediately breaking > every application. Uh ... what? I fail to understand your objection. AFAICS the only apps that cou

Re: [PATCHES] [HACKERS] Better handling of parse errors

2002-08-18 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > In strings.sql: > -- illegal string continuation syntax > SELECT 'first line' > ' - next line' /* this comment is not allowed here */ > ' - third line' > AS "Illegal comment within continuation"; > ERROR: parser: parse error at or near "' -

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > I know this causes problems for dumped and reloaded data. Yup. > In MSSQL this > is gotten around by allowing the properties of the data type to be > altered, e.g. in MSSQL you can turn the IDENTITY property on or off Rather pointless if it can be turn

Re: [HACKERS] Open 7.3 issues

2002-08-18 Thread Nigel J. Andrews
On Fri, 16 Aug 2002, Bruce Momjian wrote: > Peter Eisentraut wrote: > > Bruce Momjian writes: > > > > > Socket permissions - only install user can access db by default > > > unix_socket_permissions in postgresql.conf > > > > This is dead. > > Removed, still on TODO. Daft question

Re: [HACKERS] Remove implicit unique index creation on SERIAL

2002-08-18 Thread Rod Taylor
On Sun, 2002-08-18 at 02:35, Joe Conway wrote: > Tom Lane wrote: > > Joe Conway <[EMAIL PROTECTED]> writes: > >>I agree 100%. If you want an index, unique constraint, or primary key on > >>a SERIAL, I think you should explicitly add it. SERIAL should give me a > >>column that automatically incre

Re: [HACKERS] Remove implicit unique index creation on SERIAL columns?

2002-08-18 Thread Þórhallur Hálfdánarson
Hi -*- Joe Conway <[EMAIL PROTECTED]> [ 2002-08-18 06:36 ]: > Maybe I should restate my comment above: SERIAL should give me a column > that automatically increments -- no more, no less -- and it should not > allow me to override the value that it gives. Hence an implicit NOT > NULL, but also

Re: [HACKERS] [SECURITY] DoS attack on backend possible (was: Re:

2002-08-18 Thread Alvar Freude
Hi, -- [EMAIL PROTECTED] wrote: > What about checking the input for backslash, quote, > and double quote (\'")? If you are not taking care of those in input > then crashing the backend is going to be the least of your worries. with Perl and *using placeholders and bind values*, the applica

Re: [HACKERS] Open 7.3 items

2002-08-18 Thread Peter Eisentraut
Tom Lane writes: > BTW, I just thought of a small improvement to your patch that eliminates > some of the ugliness. Suppose that when we recognize an attempt to > connect as a global user (ie, feature flag is on and last character of > username is '@'), we strip off the '@' before proceeding. I

Re: [PATCHES] [HACKERS] Better handling of parse errors

2002-08-18 Thread Peter Eisentraut
Gavin Sherry writes: > In that case, attached is a patch which locates the beginning of the > offending token more efficiently (per your suggestion of using > scanbuf). In the regression tests there are a couple of cases that could be improved: In strings.sql: -- illegal string continuation sy