[HACKERS] viewing source code

2007-12-22 Thread Roberts, Jon
Tom Lane indicated this thread should be moved here. Instead of asking for what I consider the solution, let me propose a real business case and you guys tell me how best to handle it. I am building an Enterprise Data Warehouse with PostgreSQL. BTW, I love this database. I will have data

Re: [HACKERS] Psql command-line completion bug

2008-01-08 Thread Roberts, Jon
Option 5 would be to deprecate the ability to use a \ in an object name. Jon -Original Message- From: Gregory Stark [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 8:14 AM To: pgsql-hackers list Subject: [HACKERS] Psql command-line completion bug If you hit tab on a

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Roberts, Jon
-Original Message- On Oracle: SQL select to_date('31-DEC-200700:00:00', 'dd-mon- hh24:mi:ss') from dual; TO_DATE(' - 31-DEC-07 On PostgreSQL: select to_date('31-DEC-200700:00:00', 'dd-mon- hh24:mi:ss'); to_date -- 200700-12-31 Now the

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Roberts, Jon
I always put security definer as I really think that should be the default behavior. Anyway, your function should run faster. Jon -Original Message- From: Pavel Stehule [mailto:[EMAIL PROTECTED] Sent: Thursday, January 10, 2008 8:47 AM To: Roberts, Jon Cc: Peter Eisentraut; pgsql

Re: [HACKERS] to_char incompatibility

2008-01-10 Thread Roberts, Jon
Jon, I always put security definer as I really think that should be the default behavior. Anyway, your function should run faster. That's not a real good idea. A security definer function is like an SUID shell script; only to be used with great care. You'll have to explain to

[HACKERS] could not open relation: Invalid argument

2008-01-11 Thread Roberts, Jon
Version: PostgreSQL 8.2.5 on i686-pc-mingw32 I recently started getting this error message randomly, could not open relation 42904/42906/42985: Invalid argument. I also got it for a couple of other files. All three files are related to tables that have just a single row each. I googled the

Re: [HACKERS] Postgresql Materialized views

2008-01-14 Thread Roberts, Jon
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Sunday, January 13, 2008 8:18 PM To: Sean Utt Cc: Andrew Dunstan; Joshua D. Drake; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Postgresql Materialized views Sean Utt [EMAIL PROTECTED] writes: My point is

Re: [HACKERS] to_char incompatibility

2008-01-14 Thread Roberts, Jon
You'll have to explain to Oracle and their customers that Oracle's security model is not a great idea then. I'd love to, and in fact *do* whenever I'm given the chance. In fact, Oracle's security model is pretty bad; the reason why Oracle advertises Unbreakable so hard is that they

[HACKERS] Password policy

2008-01-15 Thread Roberts, Jon
I need to set a basic password policy for accounts but I don't see any documentation on how to do it. I'm assuming there is a way to do this, maybe even with a trigger. The policy would be something like this: 1. Must contain letters and numbers 2. Must be at least 8 characters long 3. Must

Re: [HACKERS] Password policy

2008-01-16 Thread Roberts, Jon
-Original Message- From: D'Arcy J.M. Cain [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 16, 2008 9:39 AM To: Andrew Dunstan Cc: Roberts, Jon; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Password policy On Wed, 16 Jan 2008 08:32:12 -0500 Andrew Dunstan [EMAIL

Re: [LIKELY_SPAM][HACKERS] Thoughts about bug #3883

2008-01-22 Thread Roberts, Jon
I suggest make a distinction between DDL and DML locks. A DDL lock would be required for a TRUNCATE, CREATE, ALTER, DROP, REPLACE, etc while DML is just insert, update, and delete. A TRUNCATE (or any DDL activity) should wait until all DML activity is committed before it can acquire an exclusive

[HACKERS] autonomous transactions

2008-01-22 Thread Roberts, Jon
I really needed this functionality in PostgreSQL. A common use for autonomous transactions is error logging. I want to log sqlerrm in a function and raise an exception so the calling application knows there is an error and I have it logged to a table. I figured out a way to hack an

Re: [HACKERS] autonomous transactions

2008-01-22 Thread Roberts, Jon
On Tue, 2008-01-22 at 10:02 -0600, Roberts, Jon wrote: Maybe someone could enhance this concept to include it with the core database to provide autonomous transactions. I agree that autonomous transactions would be useful, but doing them via dblink is a kludge. Kludge or hack but I

Re: [HACKERS] autonomous transactions

2008-01-28 Thread Roberts, Jon
On Wed, Jan 23, 2008 at 05:50:02PM -0500, Tom Lane wrote: Simon Riggs [EMAIL PROTECTED] writes: From looking at how Oracle does them, autonomous transactions are completely independent of the transaction that originates them -- they take a new database snapshot. This means that

[HACKERS] timestamp format bug

2008-01-31 Thread Roberts, Jon
select to_char(date, '-mm-dd hh24:mi:ss.ms') as char, date from (select timestamp'2008-01-30 15:06:21.560' as date) sub 2008-01-30 15:06:21.560;2008-01-30 15:06:21.56 Why does the timestamp field truncate the 0 but when I show the timestamp as a character in the default timestamp

Re: [HACKERS] timestamp format bug

2008-01-31 Thread Roberts, Jon
-Original Message- From: Kevin Grittner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 9:48 AM To: Roberts, Jon; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] timestamp format bug On Thu, Jan 31, 2008 at 9:34 AM, in message [EMAIL PROTECTED], Roberts, Jon

Re: [HACKERS] timestamp format bug

2008-01-31 Thread Roberts, Jon
-Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 10:48 AM To: Kevin Grittner Cc: Roberts, Jon; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] timestamp format bug Kevin Grittner [EMAIL PROTECTED] writes: On Thu, Jan 31, 2008

Re: [HACKERS] timestamp format bug

2008-01-31 Thread Roberts, Jon
-Original Message- From: Kevin Grittner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 12:33 PM To: Roberts, Jon; pgsql-hackers@postgresql.org Subject: RE: [HACKERS] timestamp format bug On Thu, Jan 31, 2008 at 12:28 PM, in message [EMAIL PROTECTED], Roberts, Jon

Re: [HACKERS] timestamp format bug

2008-01-31 Thread Roberts, Jon
-Original Message- From: Kevin Grittner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 1:47 PM To: Roberts, Jon; pgsql-hackers@postgresql.org Subject: RE: [HACKERS] timestamp format bug On Thu, Jan 31, 2008 at 12:45 PM, in message [EMAIL PROTECTED], Roberts, Jon

Re: [HACKERS] Merge condition in postgresql

2008-02-04 Thread Roberts, Jon
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-hackers- [EMAIL PROTECTED] On Behalf Of Stephen Frost Sent: Monday, February 04, 2008 8:28 AM To: Amit jain Cc: pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Merge condition in postgresql * Amit jain ([EMAIL

Re: [HACKERS] subquery in limit

2008-02-15 Thread Roberts, Jon
I have no idea why you can't do a subquery in the limit but you can reference a function: create table test as select * from pg_tables; create or replace function fn_count(p_sql varchar) returns int as $$ declare v_count int; begin execute p_sql into v_count; return v_count; end; $$

Re: [HACKERS] subquery in limit

2008-02-15 Thread Roberts, Jon
Roberts, Jon [EMAIL PROTECTED] writes: I have no idea why you can't do a subquery in the limit It hasn't seemed worth putting any effort into --- AFAIR this is the first time anyone's even inquired about it. As you say, you can always use a function. And I'm sure someone will point

Re: [HACKERS] Permanent settings

2008-02-19 Thread Roberts, Jon
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-hackers- [EMAIL PROTECTED] On Behalf Of Magnus Hagander Sent: Tuesday, February 19, 2008 8:36 AM To: pgsql-hackers Subject: [HACKERS] Permanent settings What I'd really like to see is something like a new keyword on the SET

Re: [HACKERS] Permanent settings

2008-02-19 Thread Roberts, Jon
Gregory Stark wrote: The alternative is to have two files and read them both. Then if you change a variable which is overridden by the other source you can warn that the change is ineffective. I think on balance the include file method is so much simpler that I prefer it. I

Re: [HACKERS] Including PL/PgSQL by default

2008-02-21 Thread Roberts, Jon
Joshua D. Drake wrote: Notice that user foo is not a super user. Now I log into PostgreSQL and connect to the postgres database (the super users database) as the non privileged user foo. The user foo in theory has *zero* rights here accept that he can connect. That's not

Re: [HACKERS] Including PL/PgSQL by default

2008-02-22 Thread Roberts, Jon
-Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-hackers- [EMAIL PROTECTED] On Behalf Of Andrew Dunstan Sent: Friday, February 22, 2008 9:28 AM To: Tom Lane Cc: Joshua D. Drake; Greg Sabino Mullane; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Including PL/PgSQL by

[HACKERS] Tuning 8.3

2008-02-25 Thread Roberts, Jon
I need to run about 1000 PostgreSQL connections on a server that I can use about 4 GB of the total 16 GB of total RAM. It seems that each session creates a process that uses about 15 MB of RAM just for connecting so I'm running out of RAM rather quickly. I have these non-default settings:

Re: [HACKERS] Tuning 8.3

2008-02-25 Thread Roberts, Jon
I need to run about 1000 PostgreSQL connections on a server that I can use about 4 GB of the total 16 GB of total RAM. It seems that each session creates a process that uses about 15 MB of RAM just for connecting so I'm running out of RAM rather quickly. I think you're being bitten by

[HACKERS] pgAgent job throttling

2008-02-25 Thread Roberts, Jon
I posted earlier about how to tune my server and I think the real problem is how many connections pgAgent creates for my job needs. I basically need to run hundreds of jobs daily all to be executed at 4:00 AM. To keep the jobs from killing the other systems, I am throttling this with a queue

[HACKERS] pgAgent job limit

2008-02-26 Thread Roberts, Jon
In pgAgent.cpp, I would like to add LIMIT as shown below: LogMessage(_(Checking for jobs to run), LOG_DEBUG); DBresult *res=serviceConn-Execute( wxT(SELECT J.jobid ) wxT( FROM pgagent.pga_job J ) wxT( WHERE jobenabled ) wxT( AND jobagentid IS NULL ) wxT( AND jobnextrun = now() ) wxT(

Re: [HACKERS] pgAgent job limit

2008-02-26 Thread Roberts, Jon
Roberts, Jon wrote: In pgAgent.cpp, I would like to add LIMIT as shown below: [snip] What do you guys think? What has this to do with -hackers? I don't even know what project this refers to - it certainly doesn't refer to core postgres, which is what -hackers is about

Re: [HACKERS] pgAgent job limit

2008-02-26 Thread Roberts, Jon
-Original Message- From: Magnus Hagander [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 26, 2008 8:17 AM To: Roberts, Jon Cc: Andrew Dunstan; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] pgAgent job limit On Tue, Feb 26, 2008 at 08:10:09AM -0600, Roberts, Jon wrote