[GENERAL] v8.2.12 released?

2009-02-06 Thread Adam Witney
Has v8.2.12 been released? it is in the download file browser section, but not on the home page of the website thanks adam -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Is this a security risk?

2008-12-17 Thread Adam Witney
On 17 Dec 2008, at 14:44, Albe Laurenz wrote: Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using

Re: [GENERAL] Is this a security risk?

2008-12-17 Thread Adam Witney
On 17 Dec 2008, at 07:48, Albe Laurenz wrote: Adam Witney wrote: I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using

[GENERAL] Is this a security risk?

2008-12-16 Thread Adam Witney
I would like to provide a limited view of my database to some users, so i thought of creating a second database (I can control access by IP address through pg_hba.conf) with some views that queried the first database using dblink. The problem is that dblink requires non-superusers to

[GENERAL] Implementing programatic access to a database using dblink?

2008-12-12 Thread Adam Witney
Hi, Our database (8.2.6) runs on a separate machine from the web interface. Each user has their own username/password and row level security is handled by a set of views on top of the base tables. I'd like to provide programatic access to my database (I have been looking at Perl's

Re: [GENERAL] import content of XLS file into PostgreSQL

2007-08-06 Thread Adam Witney
I would like to know what should i do to import the content (not all columns) of a XLS file into pgsql. is there something special to do ? Simplest way is to save it as a TAB delimited file and then look at the COPY command? Or if it needs more complicated processing... you could write a perl

Re: [GENERAL] Restrict access

2007-08-02 Thread Adam Witney
On 2/8/07 13:35, in article [EMAIL PROTECTED], Michael Knudsen [EMAIL PROTECTED] wrote: Hi, I have created a database and imported a lot of data. I would like to share this database with other people but they should not be able to change anything. That is, they should only be allowed to

Re: [GENERAL] Mac OS X

2007-07-12 Thread Adam Witney
I tried to install postgres onto my macbook via 'fink' and don't like it all that much. I decided to install from source, it's a fallback to my slackware days. But fink already created a user postgres and I can't seem to find anything to change it's configuration settings for shell, home

[GENERAL] Date style handling changes between 7.4.12 and 8.2.4

2007-06-12 Thread Adam Witney
Hi, I am upgrading from 7.4.12 to 8.2.4 and I have run into a difference in date style handling... In 7.4.12 this would work bugasbase2=# create table date_test (name date); CREATE TABLE bugasbase2=# insert into date_test values('Wed Jul 11 10:51:14 GMT+01:00 2001'); However in 8.2.4 this

Re: [GENERAL] Date style handling changes between 7.4.12 and 8.2.4

2007-06-12 Thread Adam Witney
Excellent, thanks very much. Will this make it into the general source tree? Or would I have to patch this with future upgrades? adam On 12/6/07 16:51, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: In 7.4.12 this would work bugasbase2=# insert into date_test

Re: [GENERAL] I have a questions, can you help-me ?

2006-07-16 Thread Adam Witney
vagner mendes wrote: how can i do, for to install Postgresql in my Mac ? what´s steps i have do ? Thank you by your attention. (best to send these requests for help to the mailing list) There are several options for OSX, there is an Apple article here:

Re: [GENERAL] not valid character for Unicode

2006-06-10 Thread Adam Witney
Martijn van Oosterhout wrote: On Fri, Jun 09, 2006 at 04:32:35PM +0100, Adam Witney wrote: The database will do it for you. Note that the client encoding affects input *and* output. So if you set it to latin1, the database will convert all strings to latin1 before sending them to you... ok

[GENERAL] not valid character for Unicode

2006-06-09 Thread Adam Witney
Hi, Im trying to upgrade from 7.4 - 8.1 but it is failing with Unicode errors. The offending character is the greek character mu (often used for micro). Here is an offending string [EMAIL PROTECTED] (in case it doesn't appear in the email, the mu is between the B and the G) Any ideas why this

Re: [GENERAL] not valid character for Unicode

2006-06-09 Thread Adam Witney
Martijn van Oosterhout wrote: On Fri, Jun 09, 2006 at 03:59:52PM +0100, Adam Witney wrote: Hi, Im trying to upgrade from 7.4 - 8.1 but it is failing with Unicode errors. The offending character is the greek character mu (often used for micro). Here is an offending string [EMAIL PROTECTED

Re: [GENERAL] not valid character for Unicode

2006-06-09 Thread Adam Witney
I have to replace fields with this in it with a valid string that will load into 8.1, do you know who i would do the conversion? The database will do it for you. Note that the client encoding affects input *and* output. So if you set it to latin1, the database will convert all strings to

Re: [GENERAL] not valid character for Unicode

2006-06-09 Thread Adam Witney
For migration, you should pg_dump- it's not clear from your email whether you are doing that. If you typed up some sql in Windows which you want to load into postgres, you might try: set client_encoding to 'LATIN1'; at the top of your script. yes this was how i spotted the problem. If i

Re: [GENERAL] does this mean i have a corruption?

2006-06-05 Thread Adam Witney
[EMAIL PROTECTED] wrote: On Mon June 5 2006 1:31 am, Adam Witney wrote: Tom Lane wrote: Adam Witney [EMAIL PROTECTED] writes: bugasbase2=# SELECT bioassay_id, count(*) from mba_data_base where bioassay_id = 5153 group by bioassay_id; bioassay_id | count -+--- 5153

Re: [GENERAL] does this mean i have a corruption?

2006-06-05 Thread Adam Witney
Tom Lane wrote: Adam Witney [EMAIL PROTECTED] writes: I don't know, so posting your question to the list. I meant to ask last night in fact, should i be worried as to why this occurred? Yeah, you should, but since you hadn't given us any context about the problem I figured you only cared

[GENERAL] does this mean i have a corruption?

2006-06-04 Thread Adam Witney
I have a table to which i bulk load datasets of about up to 20,000 rows at a time. It has a primary key, plus a dataset id (bioassay_id), however i just ran this query: bugasbase2=# SELECT bioassay_id, count(*) from mba_data_base where bioassay_id = 5153 group by bioassay_id; bioassay_id |

Re: [GENERAL] does this mean i have a corruption?

2006-06-04 Thread Adam Witney
Tom Lane wrote: Adam Witney [EMAIL PROTECTED] writes: bugasbase2=# SELECT bioassay_id, count(*) from mba_data_base where bioassay_id = 5153 group by bioassay_id; bioassay_id | count -+--- 5153 | 2 9712 | 120 That's pretty interesting :-(. What PG

Re: [GENERAL] How to find release notes

2006-02-02 Thread Adam Witney
On 2/2/06 3:56 pm, Russ Brown [EMAIL PROTECTED] wrote: Hi, I'm looking at www.postgrsql.org and wondering how to find the release notes for 8.1.2. I can see the link for the 8.1.2 release, but that just links to a directory of the release tarballs. Actually, all that would be needed

Re: [GENERAL] How to find release notes

2006-02-02 Thread Adam Witney
On 2/2/06 4:06 pm, Russ Brown [EMAIL PROTECTED] wrote: Ah, there is it. Thanks! Just me not looking hard enough. However, I would argue that I shouldn't have to look so hard. I instinctively went for the 8.1.2 release link, and I think there should be a link to the release notes right there

[GENERAL] Passwords when changing users - roles

2006-02-01 Thread Adam Witney
Hi, I'm upgrading from 7.4.x to 8.1.x and I need to move my usernames over to the new roles. I can create the roles ok, but is there a way of transferring over the existing passwords, or do I have to create new passwords for each user/role? Thanks for any help adam -- This message has been

Re: [GENERAL] Passwords when changing users - roles

2006-02-01 Thread Adam Witney
On 1/2/06 3:04 pm, Bruce Momjian pgman@candle.pha.pa.us wrote: Adam Witney wrote: Hi, I'm upgrading from 7.4.x to 8.1.x and I need to move my usernames over to the new roles. I can create the roles ok, but is there a way of transferring over the existing passwords, or do I have to create

[GENERAL] Encoding errors when upgrading from 7.4 to 8.1

2006-01-26 Thread Adam Witney
Hi, I am upgrading from 7.4.8 - 8.1.2 on Linux 2.6.14.3 #1 SMP I have installed 8.1.2 and created the database (with encoding 'UNICODE', as I had done in 7.4.8) and am trying to load a 7.4.8 dump file but I am getting a few errors like this: psql:bugasbase2-backup:45880: ERROR: invalid UTF-8

[GENERAL] Error on PostgreSQL mailing list web pages?

2005-12-07 Thread Adam Witney
I'm not sure which list to send this to But is the majordomo address spelt correctly on the mailing list pages. Here for example: http://archives.postgresql.org/pgsql-advocacy/ It is spelt [EMAIL PROTECTED] Also on a couple of the others I have looked at... Is this right? Adam -- This

Re: [GENERAL] Table design

2005-12-02 Thread Adam Witney
Hi Sean, We use something similar to approach 1) to store our microarray data. We have a data table that has a few specific columns (signal median, bkg median etc) as these exist in all the file formats... Plus also some generic columns for the rest of the data fields. Then we have a

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-28 Thread Adam Witney
On 26/11/05 4:48 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: I deleted the two datasets in mba_data_base that were affected by the empty pages, I also deleted the relevant two rows in measured_bioassay_base... But maybe it didn't do the right thing

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-26 Thread Adam Witney
On 24/11/05 5:27 pm, Adam Witney [EMAIL PROTECTED] wrote: On 24/11/05 5:28 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: Does this help identifying what went wrong? At this point I think there's no question that your filesystem is dropping blocks :-(. Might

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-26 Thread Adam Witney
On 26/11/05 4:14 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: pg_dump: ERROR: unexpected chunk number 5153 (expected 21) for toast value 245334402 measured_bioassay_base is always inserted at the same time as mba_data_base (the table where I had the problem

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-24 Thread Adam Witney
On 23/11/05 10:20 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: Whats the best way to zero the bad block? Probably dd from /dev/zero, along the lines of dd bs=8k seek=597621 count=1 conv=notrunc if=/dev/zero of=relation (check this before you apply

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-24 Thread Adam Witney
On 24/11/05 2:48 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: Just wanted to clarify, should this not be dd bs=8k seek=7 count=1 conv=notrunc if=/dev/zero of=134401991.4 Looks reasonable. regards, tom lane Excellent thanks. I have run it and copied

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-24 Thread Adam Witney
On 24/11/05 3:52 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: bugasbase2=# vacuum; WARNING: relation mba_data_base page 597621 is uninitialized --- fixing This is the expected result of what you did. WARNING: relation mba_data_base page 640793

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-24 Thread Adam Witney
On 24/11/05 4:19 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: If you mean by that, this: select * from mba_data_base where ctid = '(640792,12)'; select * from mba_data_base where ctid = '(640799,1)'; Then the data looks normal... Of course everything

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-24 Thread Adam Witney
On 24/11/05 4:42 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: On 24/11/05 4:19 pm, Tom Lane [EMAIL PROTECTED] wrote: The question is, can you tell whether any data is actually missing? Well each of these datasets are about 20,000 rows each... So I can tell

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-24 Thread Adam Witney
On 24/11/05 5:28 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: Does this help identifying what went wrong? At this point I think there's no question that your filesystem is dropping blocks :-(. Might want to check for available kernel updates, or contemplate

[GENERAL] invalid page header in block 597621 of relation... error

2005-11-23 Thread Adam Witney
Hi, I just had this error in my database: bugasbase2=# SELECT count(*) from mba_data_base; ERROR: invalid page header in block 597621 of relation mba_data_base Any ideas whats going on? Am a bit worried as this is my production database. Thanks for any assistance Adam -- This message has

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-23 Thread Adam Witney
On 23/11/05 8:55 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: bugasbase2=# SELECT count(*) from mba_data_base; ERROR: invalid page header in block 597621 of relation mba_data_base Sounds like a data corruption problem :-(. Do you want to pull out that page

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-23 Thread Adam Witney
On 23/11/05 9:36 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: Thanks for the help Here is the output: [EMAIL PROTECTED]:/opt$ dd bs=8k skip=7 count=1 if=134401991.4 | od -x 000 * 001 1d9e 201c 0fa0

Re: [GENERAL] invalid page header in block 597621 of relation...error

2005-11-23 Thread Adam Witney
On 23/11/05 9:55 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: This table is only ever COPY'd to from data files, no updates or deletes, if I could find out which data file this bit comes from I could just reupload that file... Is it possible to tell what

Re: [GENERAL] Access management for DB project.

2005-09-08 Thread Adam Witney
On 8/9/05 11:08 am, Bohdan Linda [EMAIL PROTECTED] wrote: Hi, I started thinking of some security access management. Basically imagine this scenario according users: 1) Writer does only inserts to black hole. 2) Reader does only reports on inserted data, cannot modify or add

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-22 Thread Adam Witney
On 22/8/05 10:19 am, Nigel Horne [EMAIL PROTECTED] wrote: On Fri, 2005-08-19 at 17:29, Tom Lane wrote: Adam Witney [EMAIL PROTECTED] writes: Ah you want to return a record I suppose? CREATE TABLE test (id int, name text); INSERT INTO test VALUES(1, 'me'); INSERT INTO test VALUES(2, 'you

Re: [GENERAL]

2005-08-22 Thread Adam Witney
On 22/8/05 2:56 pm, Nigel Horne [EMAIL PROTECTED] wrote: On Mon, 2005-08-22 at 14:49, Tino Wildenhain wrote: Nigel Horne schrieb: On Fri, 2005-08-19 at 16:34, A. Kretschmer wrote: am 19.08.2005, um 15:58:20 +0100 mailte Nigel Horne folgendes: I can't work out from that how to return

[GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
Hi, I have a query that appears to have hung somehow. I have tried sending a SIGINT but this does not cancel it... What's the next step without taking down the whole server? Thanks Adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread Adam Witney
I can't work out from that how to return more than one value. Hi Nigel, Add SETOF to your function like so: CREATE TABLE test (id int); INSERT INTO test VALUES(1); INSERT INTO test VALUES(2); CREATE FUNCTION test_func() RETURNS SETOF integer AS ' SELECT id FROM test; ' LANGUAGE SQL;

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread Adam Witney
On 19/8/05 4:38 pm, Nigel Horne [EMAIL PROTECTED] wrote: On Fri, 2005-08-19 at 16:30, Adam Witney wrote: I can't work out from that how to return more than one value. Hi Nigel, Add SETOF to your function like so: CREATE TABLE test (id int); INSERT INTO test VALUES(1); INSERT

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
On 19/8/05 5:27 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: I have a query that appears to have hung somehow. I have tried sending a SIGINT but this does not cancel it... What's the next step without taking down the whole server? In theory that should always

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
On 19/8/05 6:08 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: On 19/8/05 5:27 pm, Tom Lane [EMAIL PROTECTED] wrote: In theory that should always work. What PG version is this? Can you attach to the stuck backend with gdb and get a stack trace? Am

Re: [GENERAL] How to cancel a query if SIGINT does not work?

2005-08-19 Thread Adam Witney
On 19/8/05 6:20 pm, Martijn van Oosterhout kleptog@svana.org wrote: On Fri, Aug 19, 2005 at 06:10:28PM +0100, Adam Witney wrote: If you get a pile of purely numeric output from bt, it's useless (means you're running symbol-stripped executables). I'm hoping for at least some function names

Re: [GENERAL] current_user inside SECURITY DEFINER function?

2005-07-06 Thread Adam Witney
I think you want to use session_user instead Adam Is there any way to get the name of the current user inside a PL/pgSQL function that is defined with security definer? current_user gives the name of the user who created the function. The reason I want this is that I intend to use

[GENERAL] Copying data from int column to array column

2005-06-08 Thread Adam Witney
Hi, I am trying to copy the data from an integer column into an array column in the same table. Something like this CREATE TABLE test (field1 INT, field2 INT, field3 INT[]); INSERT INTO test VALUES(1); INSERT INTO test VALUES(2); INSERT INTO test VALUES(3); INSERT INTO test VALUES(4); INSERT

Re: [GENERAL] Large Object = invalid input syntax for integer:

2005-06-06 Thread Adam Witney
On 6/6/05 4:58 am, grupos [EMAIL PROTECTED] wrote: I need to use large objects BUT I am having problemns... I instaled PostgreSQL 8.0.3 windows version with lo module. first, I created the table below: CREATE TABLE test ( description varchar(20), picture lo ) WITHOUT OIDS; After

Re: [GENERAL] Issue with OS X

2005-06-01 Thread Adam Witney
You will need to modify your shared memory settings or change your shared_buffers parameter in the postgresql.conf file. (Most likely need to increase SHMMAX as the default for OSX is quite low as I recall) Take a look here: http://www.postgresql.org/docs/8.0/static/kernel-resources.html There

Re: [GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-18 Thread Adam Witney
On 17/5/05 2:59 pm, Scott Marlowe [EMAIL PROTECTED] wrote: On Tue, 2005-05-17 at 05:08, Stephane Bortzmeyer wrote: On Mon, May 16, 2005 at 03:31:27PM -0500, Scott Marlowe [EMAIL PROTECTED] wrote a message of 48 lines which said: but how do you assign it so that requests from apache

[GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-16 Thread Adam Witney
Hi, I have a web application (PHP) which runs on its own box, and connects to a database on a second box. The database box is behind the firewall and only accepts connections from the web server. I have set up stunnel on the web server and I would like to allow some limited external direct

Re: [GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-16 Thread Adam Witney
On 16/5/05 8:17 pm, Scott Marlowe [EMAIL PROTECTED] wrote: On Mon, 2005-05-16 at 07:35, Adam Witney wrote: Hi, I have a web application (PHP) which runs on its own box, and connects to a database on a second box. The database box is behind the firewall and only accepts connections from

[GENERAL] Backup strategy

2005-01-18 Thread Adam Witney
Hi, I am setting up the backup strategy for my database. The database contains around 25 tables containing quite a lot of data that does not change very much (and when it does it is changed by me). And around 20 tables containing data which will be created and updated by the users regularly. I

Re: [GENERAL] Backup strategy

2005-01-18 Thread Adam Witney
On 18/1/05 8:38 pm, Lonni J Friedman [EMAIL PROTECTED] wrote: On Tue, 18 Jan 2005 18:23:23 +, Adam Witney [EMAIL PROTECTED] wrote: Hi, I am setting up the backup strategy for my database. The database contains around 25 tables containing quite a lot of data that does not change

Re: [GENERAL] Books for experienced DB developer

2005-01-07 Thread Adam Witney
It has been able to do this for some time now... Take a look 33.4.4. SQL Functions Returning Sets http://www.postgresql.org/docs/7.4/static/xfunc-sql.html I'm afraid this is still a problem. From my knowledge, Postgres function is able to return a single result-set not multiple. I may

[GENERAL] Pattern matching a line ending character

2004-12-16 Thread Adam Witney
Hi, I think I have managed to get a line ending character in some of my text fields. If I do a select I get this: array_design_id | gene_identifier | control_name -+---+--- 10 | SC-Calibration_10 (13F24) |

[GENERAL] Pattern matching a line ending character... Please ignore previous message, solved!

2004-12-16 Thread Adam Witney
As usual jumped the gun on my message, solved it... Its '%\r' Thanks adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ---(end of broadcast)--- TIP 6: Have you searched our

[GENERAL] Substring question

2004-12-13 Thread Adam Witney
I am trying to select a part of a text field based on a regular expression, the data looks like this Rv0001c_f Rv0002_r Rv1003c_r Etc I would like to be able to select like this (this is a regular expression I would do in perl) SELECT substring(primer_name, '(\w+)\d\d\d\d[c]*_[fr]$') from

[GENERAL] Inserting greek letters

2004-11-26 Thread Adam Witney
Hi, I have a database fronted with PHP. I want the user to be able to put scientific notation characters (greek letters really) and store them in the database. Do I have to have created the database with UNICODE encoding to do this? Also, is there anything in the PHP I have to adjust to be able

Re: [GENERAL] Inserting greek letters

2004-11-26 Thread Adam Witney
Hi Martijn, thanks for your quick reply... As for PHP, you need to have the browser and PHP agree on what character set they're going to use. Then you set the client encoding appropriately and PostgreSQL will make sure you get the information you expect. Im not sure, where do I set the

Re: [GENERAL] table name in pl/pgsql

2004-11-25 Thread Adam Witney
I think you would have to do it something like this, although whether the SELECT INTO works in an EXECUTE context I am not sure (note, completely untested code!) CREATE FUNCTION get_count(text, text) RETURNS int2 AS ' DECLARE cnt int4; BEGIN EXECUTE ''SELECT INTO cnt COUNT(*) FROM

Re: [GENERAL] Can COPY skip a header line?

2004-11-23 Thread Adam Witney
On 19/11/04 6:46 pm, Pierre-Frédéric Caillaud [EMAIL PROTECTED] wrote: can do this fine with small files But if I get above a 1000 rows it takes so long it time out. PHP is slow, but not *that* slow, you have a problem somewhere ! Aha yes, I was reading the file doing this fgets($fh,

[GENERAL] Can COPY skip a header line?

2004-11-19 Thread Adam Witney
Following on from my question yesterday... Can COPY then be made to skip a header line (the first line of the file say)? The problem is this... I need to allow a user to upload a data file through a web browser (PHP driven). This is then processed and the selected file columns mapped to fields

Re: [GENERAL] Can COPY skip a header line?

2004-11-19 Thread Adam Witney
all the data to it. Hope this helps, On Fri, Nov 19, 2004 at 03:43:18PM +, Adam Witney wrote: Following on from my question yesterday... Can COPY then be made to skip a header line (the first line of the file say)? The problem is this... I need to allow a user to upload a data file

[GENERAL] Can COPY skip columns?

2004-11-18 Thread Adam Witney
Hi, Is it possible for the COPY command to read data from a file, but skip specific columns? Thanks Adam -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ---(end of broadcast)---

Re: [GENERAL] Can COPY skip columns?

2004-11-18 Thread Adam Witney
Hi Joshua, Sorry, I meant skip a column in the file, not the database table, or is that what you meant? Thanks adam Adam Witney wrote: Hi, Is it possible for the COPY command to read data from a file, but skip specific columns? \h copy COPY tablename [ ( column

Re: [GENERAL] Can COPY skip columns?

2004-11-18 Thread Adam Witney
On 18/11/04 5:15 pm, Tom Lane [EMAIL PROTECTED] wrote: Adam Witney [EMAIL PROTECTED] writes: Is it possible for the COPY command to read data from a file, but skip specific columns? Nope. When you get into significant massaging of the input data, usually the best bet is to COPY

Re: [GENERAL] Wanted: Want to hide data by using PL/PGSQL functions

2004-07-21 Thread Adam Witney
To return a result set use SETOF, like so CREATE FUNCTION test() RETURNS SETOF text AS ' To allow access to the tables only through a function, take a look at declaring your functions with SECURITY DEFINER CREATE FUNCTION test() RETURNS SETOF text SECURITY DEFINER AS ' .. Inside the function

Re: [GENERAL] DML Restriction unless through a function

2004-06-30 Thread Adam Witney
On 30/6/04 2:52 pm, Bruno Wolff III [EMAIL PROTECTED] wrote: On Wed, Jun 30, 2004 at 13:21:00 +0100, [EMAIL PROTECTED] wrote: If I revoke insert,update,delete privileges on a table, would the user still be able to affect data manipulation through a function? Is that another way of getting

Re: [GENERAL] Web DB Management tool

2004-05-21 Thread Adam Witney
There is phpPgAdmin which works very nicely http://phppgadmin.sourceforge.net/ But there are others, take a look under Administration Tools here http://techdocs.postgresql.org/oresources.php I am looking for something like 'phpmyadmin' for postgre, so I can admin all my DB's through a web

Re: [GENERAL] Listing databases

2004-05-05 Thread Adam Witney
If you attach with psql then just use \l Or this works as well SELECT datname from pg_database; Sorry for the newbie question, but how do you get PostgreSQL to list the available databases? I know how to log into a certain database, but not list all of them. I know this must be possible

[GENERAL] Can the username calling a function be made available within the function?

2004-04-07 Thread Adam Witney
I'd like to be able to have a PL/pgSQL function defined as SECURITY DEFINER, but still have access to the calling username within the function. Is this possible? I could pass current_user as a parameter, but of course this could easily be bypassed. Is there a way of coding this? Thanks for

Re: [GENERAL] row-level security model

2004-04-02 Thread Adam Witney
On 2/4/04 4:50 am, John DeSoi [EMAIL PROTECTED] wrote: Marc, On Apr 1, 2004, at 4:21 PM, Marc Durham wrote: Do you think this would work? There are a lot of joins. And I assumed it would need to look up the parent's and teacher's usernames, and that your many-to-many relationships

Re: [GENERAL] table functions + user defined types

2003-10-27 Thread Adam Witney
On 27/10/03 3:20 pm, BARTKO, Zoltan [EMAIL PROTECTED] wrote: Ladies and Gentlemen, Please, enlighten me, if you can, in the following matter: I made a type: create type my_type as ( a integer, b integer ); since I have a table: create table my_table ( a integer; );

Re: [GENERAL] function with tablename parameter

2003-10-27 Thread Adam Witney
To use dynamic queries you will probably have to use EXECUTE, take a look here http://www.postgresql.org/docs/7.3/interactive/plpgsql-statements.html#PLPGS QL-STATEMENTS-EXECUTING-DYN-QUERIES Although that page says that EXECUTE does not support SELECT INTO queries, but you may be able to build

Re: [GENERAL] OS X installation with readline support

2003-07-14 Thread Adam Witney
This worked for me... ./configure --with-libs=/sw/lib --with-includes=/sw/include After reading this: http://marc.theaimsgroup.com/?l=postgresql-generalm=103886532224699w=2 It looks like some of you out there have successfully installed postgresql on OS X with readline support. I