[GENERAL] using PG with Syslog

2006-01-01 Thread Tony Caduto
Hi, Does anyone know of a good resource on how to use Postgresql as a destination for Syslogd messages? I am interested in putting all postfix logs to a table rather than a file. Thanks in advance, -- Tony Caduto AM Software Design Home of PG Lightning Admin for Postgresql http://www.amsoftwa

Re: [GENERAL] SET SESSION TRANSACTION command

2006-01-01 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; SESSION is taken as a noise word here. Possibly we should disallow this syntax altogether, since it isn't SQL-spec ... but I'm not sure it's worth contorting the grammar enough to do that.

Re: [GENERAL] SET SESSION TRANSACTION command

2006-01-01 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes: > On Sun, 1 Jan 2006, Tom Lane wrote: >> "Qingqing Zhou" <[EMAIL PROTECTED]> writes: >>> test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; >> >> SESSION is taken as a noise word here. Possibly we should disallow this >> syntax altogether, since

Re: [GENERAL] SET SESSION TRANSACTION command

2006-01-01 Thread Qingqing Zhou
On Sun, 1 Jan 2006, Tom Lane wrote: > "Qingqing Zhou" <[EMAIL PROTECTED]> writes: > > test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; > > SESSION is taken as a noise word here. Possibly we should disallow this > syntax altogether, since it isn't SQL-spec ... but I'm not sure it's >

Re: [GENERAL] Last line is not read from postgres.conf

2006-01-01 Thread Tom Lane
"Andrus Moor" <[EMAIL PROTECTED]> writes: > Note. Adding a newline after this line causes archive_command to be set > correctly. Good catch ... fixed for 8.1.2. regards, tom lane ---(end of broadcast)--- TIP 9: In versions b

[GENERAL] SET SESSION TRANSACTION command

2006-01-01 Thread Qingqing Zhou
test=# SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; SET test=# show transaction_isolation; transaction_isolation --- read committed (1 row) Is this a bug by any chance or we do it intentionally? Regards, Qingqing ---(end of broadcast)

Re: [GENERAL] HINT: Perhaps out of disk space?

2006-01-01 Thread John Koller
On Fri, 23 Dec 2005 13:42:13 -0500, Michael Adler wrote: > On Fri, Dec 23, 2005 at 11:36:54AM -0500, Tom Lane wrote: >> Michael Adler <[EMAIL PROTECTED]> writes: >> > I'm investigating a problem that happened last night and I would >> > appreciate any recommendations. The logs indicate that the di

Re: [GENERAL] pg_reload_conf() does not unset archive_command

2006-01-01 Thread Qingqing Zhou
"Andrus Moor" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > 1. Make sure that postgres.conf file contains in first line: > > archive_command = 'copy "%p" "c:/arhiiv/%f"' > > 2. Edit postgres.conf file by adding # before this line > > #archive_command = 'copy "%p" "c:/arhiiv/%f"'

Re: [GENERAL] pg_reload_conf() does not unset archive_command

2006-01-01 Thread Tom Lane
"Andrus Moor" <[EMAIL PROTECTED]> writes: > 1. Make sure that postgres.conf file contains in first line: > archive_command = 'copy "%p" "c:/arhiiv/%f"' > 2. Edit postgres.conf file by adding # before this line > #archive_command = 'copy "%p" "c:/arhiiv/%f"' The latter is a comment and does not cha

[GENERAL] Last line is not read from postgres.conf

2006-01-01 Thread Andrus Moor
To reproduce: 1. Add the following line as last line to postgres.conf file archive_command='copy "%p" "x"' Make sure that there is no CR LF characters after this line 2. Restart postgres 3. Issue SHOW archive_command Observed result: unset Note. Adding a newline after this line causes

[GENERAL] pg_reload_conf() does not unset archive_command

2006-01-01 Thread Andrus Moor
Platform: "PostgreSQL 8.1.0 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)" To reproduce: 1. Make sure that postgres.conf file contains in first line: archive_command = 'copy "%p" "c:/arhiiv/%f"' 2. Edit postgres.conf file by adding # before this line #archive_command

[GENERAL] How to change postgres.conf file from client

2006-01-01 Thread Andrus Moor
I want to change archive_command parameter in server postgres.conf file from client application. Doc wrote that set_config() applies to current session only and there is no pg_write_file() function. How to set archive_command from client permanently? Platoform: "PostgreSQL 8.1.0 on i686-pc-min

Re: [GENERAL] Check If PostgreSQL Table Exists

2006-01-01 Thread Madison Kelly
[EMAIL PROTECTED] wrote: Dear All, How To Check If PostgreSQL Table Exists in the Database Using Perl. Dhilchrist Here is what I do... $DBreq=$DB->prepare("SELECT COUNT(*) FROM pg_tables WHERE tablename='foo'") || die $DBI::errstr; $DBreq->execute(); my ($table_num)=$DBreq->fetchrow_array();

Re: [GENERAL] storing PDFs

2006-01-01 Thread Scott Ribe
> but If the bytea is encoded only for dump and load I think that's the case, as with all binary types dump (consider numbers for instance) to an ASCII encoding. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 665-7007 voice ---(end of broadcast)

Re: [GENERAL] bit/integer operations in postgres

2006-01-01 Thread Martijn van Oosterhout
On Thu, Dec 22, 2005 at 05:04:30PM -0800, littlebutty wrote: > HERE IS WHAT I WANT TO DO: > How do I setup a postgres constraint that will not allow an insert on > the permission table with an integer value that has more than one bit > set. In other words you could insert 1, 2, 4, 8, 16, 32, etc.

Re: [GENERAL] storing PDFs

2006-01-01 Thread Leonel Nunez
Doug McNaught wrote: Leonel Nunez <[EMAIL PROTECTED]> writes: You can use ByteA but the size will be about 4 times bigger Are you sure? The intermediate form for bytea (escaped single-quoted strings) is pretty inefficient, but once in the database the data is stored as binary a

Re: [GENERAL] storing PDFs

2006-01-01 Thread Doug McNaught
Leonel Nunez <[EMAIL PROTECTED]> writes: > You can use ByteA but the size will be about 4 times bigger Are you sure? The intermediate form for bytea (escaped single-quoted strings) is pretty inefficient, but once in the database the data is stored as binary and can even be compressed. Plus

Re: [GENERAL] storing PDFs

2006-01-01 Thread Leonel Nunez
littlebutty wrote: I have written software that will dynamically create PDF documents used within my web application. Because each document is unique, I would like to store the resultant PDF into a field of the DB. Currently I just store the file to the server's hard drive and insert a path to

Re: [GENERAL] 8.1 removed functions

2006-01-01 Thread Michael Fuhr
On Wed, Dec 28, 2005 at 05:34:47PM -0800, [EMAIL PROTECTED] wrote: > With PG 8.0 I was using a query using makeaclitem() and aclcontains() > to extract permissions. Here is a sample query for database > permissions ... [...] > What is the recommended manner to extract object permissions for 8.1 >

Re: [GENERAL] storing PDFs

2006-01-01 Thread John DeSoi
On Dec 29, 2005, at 5:45 PM, littlebutty wrote: I have written software that will dynamically create PDF documents used within my web application. Because each document is unique, I would like to store the resultant PDF into a field of the DB. Currently I just store the file to the server's

Re: [GENERAL] storing PDFs

2006-01-01 Thread Larry Rosenman
Michael Glaesemann wrote: > On Dec 29, 2005, at 16:45 , littlebutty wrote: > >> I am curious to know what everyone thinks would be the best way to >> store PDF files in postgres?? > > The BYTEA data type should do the trick. I did exactly this for a DB I did for a former employer of mine. Work

Re: [GENERAL] storing PDFs

2006-01-01 Thread Michael Glaesemann
On Dec 29, 2005, at 16:45 , littlebutty wrote: I am curious to know what everyone thinks would be the best way to store PDF files in postgres?? The BYTEA data type should do the trick. Michael Glaesemann grzm myrealbox com ---(end of broadcast)-

[GENERAL] bit/integer operations in postgres

2006-01-01 Thread littlebutty
Does anyone know how I can solve this problem in Postgres: I am creating a table of user permissions. I want to represent each permission as a bit location. Each new permission I add to my system would be assigned to the next available bit (or column if you will) That way I can simply turn on a

Re: [GENERAL] 8.1 removed functions

2006-01-01 Thread nielsgron
Hi Tom, With PG 8.0 I was using a query using makeaclitem() and aclcontains() to extract permissions. Here is a sample query for database permissions ... SELECT ((grantee.name)::character varying) AS grantee, ((nc.datname)::character varying)AS database, (pr."

[GENERAL] Check If PostgreSQL Table Exists

2006-01-01 Thread dhilchrist
Dear All, How To Check If PostgreSQL Table Exists in the Database Using Perl. Dhilchrist ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes d

[GENERAL] storing PDFs

2006-01-01 Thread littlebutty
I have written software that will dynamically create PDF documents used within my web application. Because each document is unique, I would like to store the resultant PDF into a field of the DB. Currently I just store the file to the server's hard drive and insert a path to the file the database,

Re: [GENERAL] windows xp install problem ("failed to set permissions on the installed files...")

2006-01-01 Thread Magnus Hagander
> I have installed PG on Windows XP successfully several times, > but now I have one machine on which the install fails with an > error message: "Failed to set permissions on the installed > files. Please see the logfile at ..." . The log file in > question does not look very useful. It has lin