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
);
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
- 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
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
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
: 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
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
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
// 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
: 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
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"
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
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:
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:
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
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
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.
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
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
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
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
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"
he
site or contact me directly.
-Dan Wilson
[EMAIL PROTECTED]
http://www.phpwizard.net/phpPgAdmin
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
');
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
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
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
27 matches
Mail list logo