[GENERAL] Alter column length

2001-03-23 Thread Dan Wilson
I want to alter the length of a column without dumping an re-creating the table. I found this method in the archives and was just wondering if there are any side effects... - update pg_attribute set atttypmod = [column_oid] where attname = '[column_name]' where

Re: [GENERAL] version issue?

2001-02-26 Thread Dan Wilson
); ERROR: ORDER BY on a UNION/INTERSECT/EXCEPT result must be on one of the result columns Is this a bug in beta3? One of those combinations should work! -Dan - Original Message - From: "Alfred Perlstein" [EMAIL PROTECTED] * Dan Wilson [EMAIL PROTECTED] [010225 22:47] wrote

Re: [GENERAL] version issue?

2001-02-26 Thread Dan Wilson
- Original Message - From: "Tom Lane" [EMAIL PROTECTED] : "Dan Wilson" [EMAIL PROTECTED] writes: : I have the following query running on two different servers. It works on : 7.0.3 and gives the following error on 7.1beta4. : : ERROR: Attribute 'last_name' not

Re: [GENERAL] version issue?

2001-02-26 Thread Dan Wilson
Excellent! That worked! Thank you once again Tom! I was under the impression that you couldn't use an alias in the ORDER BY. Obviously, I was mistaken. Thanks, -Dan - Original Message - From: "Tom Lane" [EMAIL PROTECTED] : "Dan Wilson" [EMAIL PROTECTED] writes

Re: [GENERAL] Grant on Database?

2001-02-20 Thread Dan Wilson
Hey All, We have a need to grant privileges on entire databases to users and/or groups. It looks like GRANT just grants on tables and sequences, but I'd like to know if there's a more direct way to do it. What I'm doing now is getting a list of tables and sequences and calling grant for

Re: [GENERAL] order of clauses

2001-02-16 Thread Dan Wilson
: SELECT a.x/b.y FROM vals a, (SELECT y FROM vals WHERE y 0) b WHERE (a.x : / b.y) 1; How much of a performance hit is there when using a select in the FROM clause? Is it even noticeable? How much better is it to create a static view? -Dan

[GENERAL] Trapping NOTICE using PHP

2001-02-12 Thread Dan Wilson
Is there any way to trap the NOTICE output (specifically in PHP)? I would like to impliment an EXPLAIN feature in phpPgAdmin and have been unsuccessful in finding a way to do this because all the information returned by EXPLAIN is in a NOTICE. Any ideas? -Dan

Re: [GENERAL] Re: [HACKERS] Re: Re: grant privileges to a database [URGENT]

2001-02-05 Thread Dan Wilson
A step in the right direction for this to have the system catalog have pg_user_* views. So dor databases we have: create view pg_user_database as select * from pg_database where pg_get_userbyid(datdba) = CURRENT_USER Of course, this doesn't account for superusers, but I'm sure there is a way

Re: [GENERAL] pg_dump shell or php?

2001-02-02 Thread Dan Wilson
// File: pg_backup.php // Purpose: backup postgres // Date: 02 Dec 2000 // Author: Dan Wilson $data_dir = "/home/dan/db_backup/data"; $pg_dump_dir = "/usr/bin"; $keep = (60 * 60 * 24) * 30; // 30 days $dbname[] = "database_name"; $dump_date = date(&quo

Re: [GENERAL] php as stored procedures

2001-01-31 Thread Dan Wilson
: As for whether it will be done, well, what does PHP give you over : Perl? I know Perl well and PHP AFAICS is a tiny subset of Perl : designed to be embedded in web pages. Given PL/Perl, do we really : need PL/PHP? I wouldn't call PHP a subset of Perl at all! I'd call them sibling languages

[GENERAL] Weird View behavior

2001-01-26 Thread Dan Wilson
I've got some wierd behavior with a view that I created. devwindaily=# select version(); version -PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66(1 row) devwindaily=# \d email_num View "email_num"

Re: [GENERAL] System tables

2001-01-22 Thread Dan Wilson
Descriptions of the system tables can be found here: http://www.postgresql.org/devel-corner/docs/postgres/catalogs.htm Also, if you want to muddle through some PHP code, you can get phpPgAdmin and checkout how the database and table structures are retrieved. It's all done with standard

[GENERAL] NEXTVAL function Bug

2000-12-26 Thread Dan Wilson
Ok... I think I found a bug... tell me if I'm smoking something on this: I create a table with a mixed case name... everything works fine until I try to use the sequence created with the SERIAL datatype. test_db=# create table "mixed_Case" ("mix_id" SERIAL, "mix_var" varchar(50)); NOTICE:

Re: [GENERAL] newbie question:

2000-12-19 Thread Dan Wilson
ALTER USER postgres WITH PASSWORD '[enter password]' http://www.postgresql.org/users-lounge/docs/7.0/user/sql-alteruser.htm - Original Message - From: "Leon van Dongen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 18, 2000 1:56 AM Subject: [GENERAL] newbie question:

Re: [GENERAL] Auto incrementing fields. How?

2000-12-19 Thread Dan Wilson
Use the column type of SERIAL in your create table statement. This will automatically create a sequence and default for the given column. http://www.postgresql.org/users-lounge/docs/7.0/user/sql-createsequence.htm for more on sequences. - Original Message - From: "Harry Wood" [EMAIL

Re: [GENERAL] grant a db

2000-12-19 Thread Dan Wilson
Just recently added this functionality to phpPgAdmin. You can now update the ACL of all the objects (tables, sequences, views) of a database at the same time. This will be part of the next release (2.2.1) which should happen this week sometime. Look for the announcement. -Dan - Original

[GENERAL] Trigger/Function problem

2000-12-14 Thread Dan Wilson
I'm having problems with a trigger/function and I think it's actually a system problem but I have no clue how to fix it. The trigger is supposed to automatically timestamp the record when it is altered. I've never used anything more than a sql function before so the plpgsql is new to me.

Re: [GENERAL] Trigger/Function problem

2000-12-14 Thread Dan Wilson
PROTECTED] On Thursday 14 December 2000 21:27, Dan Wilson wrote: I'm totally fine up to this point... then I try this: UPDATE help SET site_id = 'APW' WHERE help_id = 2; I get the following error: NOTICE: plpgsql: ERROR during compile of f_auto_date near line 1 "RRO

Re: [GENERAL] Trigger/Function problem

2000-12-14 Thread Dan Wilson
That was it! Thanks Tom. I just put this functionality into phpPgAdmin and of course it is taking the newline char from the browser's OS. Thanks for all your help! -Dan "Dan Wilson" [EMAIL PROTECTED] writes: I get the following error: NOTICE: plpgsql: ERROR duri

[GENERAL] DB and Table Permissions

2000-11-19 Thread Dan Wilson
Is there a reason why _any_ user can create a table on a database? Even if they do not own or have any permissions to it? I don't think that should happen. Is there a specific reason why it does? -Dan Wilson

Re: [GENERAL] unique indexes

2000-11-19 Thread Dan Wilson
or i.indkey[5] = a.attnum or i.indkey[6] = a.attnum or i.indkey[7] = a.attnum ) ORDER BY index_name, tab_name, column_name; This was adapted from the psql source. Hope it's what you need. -Dan Wilson - Original Message - From: "Jason Davies" [EMAIL

Re: [GENERAL] unique indexes

2000-11-19 Thread Dan Wilson
Tom, Thanks for the update on this query. I'm not positive where I found this query, but I'm pretty sure it was for a v6.5x something. Anyway, thanks. phpPgAdmin has been updated. -Dan - Original Message - From: "Tom Lane" [EMAIL PROTECTED] To: "Dan Wilson"

[ANNOUNCE] phpPgAdmin 2.0.1 released

2000-06-04 Thread Dan Wilson
he site or contact me directly. -Dan Wilson [EMAIL PROTECTED] http://www.phpwizard.net/phpPgAdmin

Re: [GENERAL] Query buffer problem.

1999-08-03 Thread Dan Wilson
Semicolon (;) at the end of each line should fix it. -Dan Hi, I insert 10,000 data into PostgreSQL database. I got the problem while inserting: query buffer max length of 2 exceeded query line ignored . query buffer max length of 2 exceeded query line ignored ');

Re: [GENERAL] pg-dump -- primary Key

1999-07-25 Thread Dan Wilson
is a primary key. Is there a better property or flag to examine for this purpose? -Dan On Sun, Jul 25, 1999 at 03:13:39PM +1000, Chris Bitmead wrote: Dan Wilson wrote: Yes, I am aware that the primary key does not really mean anything except implicitly making it a unique key, but it's supposed

[GENERAL] escaping wildcard chars

1999-07-25 Thread Dan Wilson
I am trying to pull in the different types allowed by postgres for a create function statement and am having problems with the types that start with an underscore (_). Because the underscore is the wildcard for a single character, I cannot perform the following query correctly. SELECT typname

[GENERAL] pg-dump -- primary Key

1999-07-24 Thread Dan Wilson
I was looking at the pg_dump and realized that it does not indicate the primary keys. Why is this? It does dump the primary keys with the indexed, however as far as I could tell, it did not indicate anything as the primary key. Yes, I am aware that the primary key does not really mean anything