| query of database to get permitted users list |
|
 |
Index ‹ database
|
- Previous
- 1
- Newbie question: - The password specified for the user ID is incorrect.(CCA5001N)I have just installed DB2 on Windows Advanced Server. I am trying to
use the Configuration Assistant to create a database, but receive an
error message saying I don't have the relevant permissions. So, I go
into DBM Configuration to create an Admin group, but receive the error
above ("The password specified for the user ID is incorrect."). I was
forced to reset my windows password recently but if DB2 is using
trusted security it seems strange that such an error occurs unless DB2
stores the password. If so, how do I change it?
Any ideas welcome,
Regards,
Paul
- 4
- exportXML with multiple recordsI added another order info in SALE_DB. After I generate 2 records in
result_tab. I can only get the last record after I run
getstart_expotXML.cmd.
Would you share how to generate multiple results to XML document.
Thanks
Nathan
- 5
- Schemata & User-Defined-Type casting issuesPostgreSQL 7.4.2 ...
Background: I'm attempting to migrate tables which were created in the
pre-schema days to a sensible schema setup. I'm using the "uniqueidentifier"
column in some of these tables. When I created the new schema, I created an
instance of "uniqueidentifier" and its supporting functions and casts within
the new schema. When I try to "INSERT INTO myschema.mytable ... SELECT ... FROM
public.mytable;" It's having difficulty seeing that the data types are
compatible across the schema. An explicit cast (without first casting to a
neuter data-type) won't work for the same reason.
I'm torn: Should I create a "cast" to allow for casting of this data-type
across schemas, or should I have created the table referencing the user-defined
type in the public schema?
I expect that this problem will rise up now and again. I'd like to solve it in
the this early phase with a proper deisgn-based fix.
If it makes a difference, I would like to not include this schema in the search
path, to explicitly refer to it as myschema.mytable anywhere I need to
reference it.
CG
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to email***@***.com so that your
message can get through to the mailing list cleanly
- 5
- I'M Sorry!
And sorry because the subject...
lol.
> On Tue, 2004-05-18 at 15:26, Ricardo Maia wrote:
> > Hi,
> >
> > I'm from Brazil, and i have a question.
> >
> > Exists some problem if i not uses the option "without oids"?
> > I read the manual, but I don't understand what I earn if i use it.
> >
> >
> > Thanks,
> >
> > Ricardo.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to email***@***.com so that your
message can get through to the mailing list cleanly
- 5
- Heads up: 7.3.6 and 7.4.2 coming soonThe core committee has agreed that it's about time to put out new
dot-releases in both the 7.3 and 7.4 branches. (The main thing forcing
this is the realization that permissions checks on view updates were
pretty badly broken by the now-reverted patch of 13-Feb-03 --- this
could be labeled a security issue.)
We have not chosen an exact date yet, but we are thinking of 7.3.6 late
this week or early next week, and 7.4.2 a week later.
So, if you've got any fixes you wanted to get into those branches,
time to get on it. I know that I discouraged a couple of people from
back-patching into 7.3.* on the grounds that "there probably won't be
another 7.3 release" ... well, I was wrong, so do it if you want.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
- 5
- [pgsql-www] Contrib/earthdistance missing from cvsweb.On Mon, 4 Oct 2004, Dave Page wrote:
>
>
>> -----Original Message-----
>> From: Bruce Momjian [mailto:email***@***.com]
>> Sent: 04 October 2004 17:17
>> To: Marc G. Fournier
>> Cc: Dave Page; PostgreSQL WWW Mailing List
>> Subject: Re: [pgsql-www] Contrib/earthdistance missing from cvsweb.
>>
>> Marc G. Fournier wrote:
>>> On Mon, 4 Oct 2004, Dave Page wrote:
>>>
>>>> Hi Marc,
>>>>
>>>> I always seem to get problems checking out the
>> earthdistance contrib
>>>> module from CVS. Tom mentioned in the past that this was
>> because you
>>>> had experimented with it when trying to split the repository.
>>>>
>>>> I can get at it if I checkout pgsql vs. pgsql-server (or
>> vice-versa,
>>>> I forget which), but as this module is also missing from
>> cvsweb, it
>>>> would be good if you could fix it. Please :-)
>>>
>>> Unfortunately, to 'fix it', I'm not sure of the risks,
>> since it causes
>>> some major headaches when i pulled it out in the first place :( If
>>> nothing else, should probably wait until *after* the release, not
>>> middle of beta ...
>>
>> This just a CVS checkout issue. It shouldn't affect the
>> actual CVS files. I think it has been pushed off too long
>> that we should just do it now. How many years must it be broken?
>
> Which reminds me of why I reported it in the first place - I already get
> errors about it being missing. I'm not sure things could get much worse!
If I correctly remember the issue, if I merge earthdistance back into the
main source tree (which is a simple mv operation and cvs update on the
modules file), it will potentially break everyone's currently checked out
CVS source, since the 'paths' will change in the CVS/Root file ...
I'm willing to do it, since all the work I generally do, I do with a fresh
check out ...
Am CC'ng in -hackers, as they will potentially be *the most* affected by
doing this ...
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email: email***@***.com Yahoo!: yscrappy ICQ: 7615664
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to email***@***.com so that your
message can get through to the mailing list cleanly
- 5
- export FUNC_MAX_ARGS as a read-only GUC variable (was:Tom Lane writes:
> One could make a good case that INDEX_MAX_KEYS should be exported along
> with FUNC_MAX_ARGS, rather than letting people write client code that
> assumes they are the same.
You can determine these values by looking into the system catalogs.
> I was intending to propose that we also export the following as
> read-only variables:
> * NAMEDATALEN
And this as well.
> * BLCKSZ
Why would anyone be interested in that?
> * integer-vs-float datetime flag
Here we should really decide on one representation in the near term.
--
Peter Eisentraut email***@***.com
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to email***@***.com
- 7
- correlated delete with "in" and "left outer join"I'm using postgresl 7.3.2 and have a query that executes very slowly.
There are 2 tables: Item and LogEvent. ItemID (an int4) is the primary key
of Item, and is also a field in LogEvent. Some ItemIDs in LogEvent do not
correspond to ItemIDs in Item, and periodically we need to purge the
non-matching ItemIDs from LogEvent.
The query is:
delete from LogEvent where EventType != 'i' and ItemID in
(select distinct e.ItemID from LogEvent e left outer join Item i
on e.ItemID = i.ItemID where e.EventType != 'i' and i.ItemID is null);
I understand that using "in" is not very efficient.
Is there some other way to write this query without the "in"?
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to email***@***.com)
- 8
- Help with casting timestamp columnI need a bit of help. I have a table full of database stats that are
all timestamped using the now() timestamp. However, I need to pull some
consolidated reports that are based upon hourly activiy. Does anyone
know of a way to get a timestamp column to return as mm/dd/yyyy hh?
Thanks for any help,
chris
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
- 10
- Is db2gncol gone?Hi all!
I'm running DB2 v8.1 on Win2K
I'm tryng to add a generated column to a quite large table (more than
2,000,000 rows). I added the column and now would like to generate
values before to run the "set integrity" command. People on this
board talked about a db2 command called db2gncol that would do the
trick but I can't find it on any of my DB2 servers even if I can find
it in the documentation.
Is there something I missed?
Thanks!
Jean-Luc
- 12
- DB_SET_LOCK_TIMEOUT and DB_CONSUME_WAITHello.
I am doing the following.
******************************************************
txn->set_timeout(1000,DB_SET_LOCK_TIMEOUT);
ret=queueDataDB2->get(parent,&key,&returnData,DB_CONSUME_WAIT|DB_RMW);
if (ret == DB_LOCK_NOTGRANTED) {
// there is no data
}
// set transaction timeout to normal
txn->set_timeout(0, DB_SET_LOCK_TIMEOUT);
*******************************************************
I have a separate thread that detects deadlock condition periodically.
However, the return code from the second line is -30995, not DB_LOCK_NOTGRANTED.
Why is it giving me that code?
Is this a bug?
Thank you.
- 12
- getColumnName() with DB2 v7 on z/OSHello,
I have stored procedure that executes on DB2 version on z/OS. I'm
calling it in a servlet. It works, but I would like to get the column
name. Instead, the ResultSetMetaData getColumnName() just returns the
column number. getColumnLabel() does the same.
I can run it in Stored Procedure Builder, and I get the same thing...
so it's not a Java issue.
Is there some magic parameter to set in DB2 on z/OS that makes it
return the column info?
thanks,
Greg Groves
Florida Hospital
- 12
- Certification QuestionsHi,
i am thinking about a certification for DB2, namely the #700 and #703 Test.
I am searching some sample tests and experience, special for Germany. Any
hints are welcome.
Thanks
Robert
- 13
- Linux in GeneralI am about to set up a new machine which will be a dedicated db2
server. The network is Novell, the clients are Windows. Small office
with 15 users. Very database-intensive. (A medical office.)
I am thinking about putting Linux OS on that machine.
I have no experience with Unix, nor anything other than windows.
What do others think about risk vs benefits? Considerations are
budget, my time, and speed.
Thanks to all who respond.
Stan
- 13
- Setting time zone commandsHi!
Seeing no comments on the same issue I raised in
pgsql-general list, I am posting it here.
The documentation (Appendix B.2. Date/Time Key Words) says
that the following SQL's are legal, but actually they are
not:
SET TIME ZONE TO '<any time zone abbreviation>'
(examples:
SET TIMEZONE TO 'NZDT';
SET TIMEZONE TO 'EST';
)
However, the following SQL's are accepted by postgres:
SET TIME ZONE TO 0
SET TIME ZONE TO 9
SET TIME ZONE TO -4
Regards,
CN
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
|
| Author |
Message |
p.willis

|
Posted: 2004-5-11 11:35:43 |
Top |
database, query of database to get permitted users list
Hello,
I have a query of pg_database to find the owners of each available database.
How can I query to get the users that have permissions on any particular
database?
pg_user always contains *all* database users regardless of whether they have
granted permissions to the current db.
Thanks for any ideas.
Peter
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
|
| |
|
| |
 |
| |
 |
Index ‹ database |
- Next
- 1
- build failed using MINGW32 / MSysI was trying to get postgresql to run / build on a windows system.
Following the instructions to get Mingw32 and MSys as directed on the site -
http://momjian.postgresql.org/main/writings/pgsql/project/win32.html
These are the steps I followed.
I downloaded MINGW32 and MSys and installed then.
Then downloaded postgresql-7.4.3.tar.gz from the ftp site.
uncompresses it and ran configure.
Ran configure --without-zlib
At this point configure completed successfully.
then ran make
This ran for a while then failed and said there was no native spinlock
support on the system and to rerun configure with --disable-spinlocks
So I reran configure.
It completed.
I reran make.
It failed again. the last output before and including the errors was :
C:/msys/1.0/mingw/mingw32/bin/ld.exe -r -o SUBSYS.o fmgrtab.o adt/SUBSYS.o
cache/SUBSYS.o error/SUBSYS.o fmgr/SUBSYS.o hash/SUBSYS.o init/SUBSYS.o
misc/SUBSYS.o mmgr/SUBSYS.o sort/SUBSYS.o time/SUBSYS.o mb/SUBSYS.o
make[3]: Leaving directory
`/home/Owner/psql/postgresql-7.4.3/src/backend/utils'
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -L../../src/port access/SUBSYS.o
bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o
executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o
optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o
rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -lreadline
-lwsock32 -lm -lpgport -o postgres
bootstrap/SUBSYS.o(.text+0x3f02):bootstrap.c: undefined reference to
`sigsetmask'
commands/SUBSYS.o(.text+0x372e):async.c: undefined reference to `kill'
libpq/SUBSYS.o(.text+0x63c4):pqsignal.c: undefined reference to `sigmask'
libpq/SUBSYS.o(.text+0x63d2):pqsignal.c: undefined reference to `sigmask'
libpq/SUBSYS.o(.text+0x63e0):pqsignal.c: undefined reference to `sigmask'
libpq/SUBSYS.o(.text+0x63ee):pqsignal.c: undefined reference to `sigmask'
libpq/SUBSYS.o(.text+0x63fc):pqsignal.c: undefined reference to `sigmask'
libpq/SUBSYS.o(.text+0x640a):pqsignal.c: more undefined references to
`sigmask'
follow
port/SUBSYS.o(.text+0x6db):pg_sema.c: undefined reference to `kill'
port/SUBSYS.o(.text+0x16ba):pg_shmem.c: undefined reference to `kill'
postmaster/SUBSYS.o(.text+0xf36):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x12f6):postmaster.c: undefined reference to
`fork'
postmaster/SUBSYS.o(.text+0x1b55):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x1b88):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x1c53):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x2c66):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x2c80):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x2e29):postmaster.c: more undefined references to
`sigsetmask' follow
postmaster/SUBSYS.o(.text+0x30be):postmaster.c: undefined reference to
`kill'
postmaster/SUBSYS.o(.text+0x30cd):postmaster.c: undefined reference to
`kill'
postmaster/SUBSYS.o(.text+0x3192):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x34d5):postmaster.c: undefined reference to
`kill'
postmaster/SUBSYS.o(.text+0x360a):postmaster.c: undefined reference to
`WIFEXITED'
postmaster/SUBSYS.o(.text+0x3645):postmaster.c: undefined reference to
`WEXITSTATUS'
postmaster/SUBSYS.o(.text+0x3675):postmaster.c: undefined reference to
`WIFSIGNALED'
postmaster/SUBSYS.o(.text+0x36a1):postmaster.c: undefined reference to
`WTERMSIG'
postmaster/SUBSYS.o(.text+0x3769):postmaster.c: undefined reference to
`kill'
postmaster/SUBSYS.o(.text+0x384c):postmaster.c: undefined reference to
`fork'
postmaster/SUBSYS.o(.text+0x3cf9):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x3e16):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x431b):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x43a5):postmaster.c: undefined reference to
`sigsetmask'
postmaster/SUBSYS.o(.text+0x466e):postmaster.c: undefined reference to
`fork'
postmaster/SUBSYS.o(.text+0x2a0b):postmaster.c: undefined reference to
`kill'
postmaster/SUBSYS.o(.text+0x4fd0):pgstat.c: undefined reference to `pipe'
postmaster/SUBSYS.o(.text+0x51c4):pgstat.c: undefined reference to `fork'
postmaster/SUBSYS.o(.text+0x6103):pgstat.c: undefined reference to `pipe'
postmaster/SUBSYS.o(.text+0x6113):pgstat.c: undefined reference to `fork'
postmaster/SUBSYS.o(.text+0x6906):pgstat.c: undefined reference to
`sigsetmask'
storage/SUBSYS.o(.text+0x30c2):fd.c: undefined reference to `fsync'
storage/SUBSYS.o(.text+0x30e2):fd.c: undefined reference to `fsync'
storage/SUBSYS.o(.text+0x41c0):fd.c: undefined reference to `ftruncate'
storage/SUBSYS.o(.text+0x7718):pmsignal.c: undefined reference to `getppid'
storage/SUBSYS.o(.text+0x7720):pmsignal.c: undefined reference to `kill'
storage/SUBSYS.o(.text+0xc283):proc.c: undefined reference to `kill'
storage/SUBSYS.o(.text+0xeff6):md.c: undefined reference to `sync'
storage/SUBSYS.o(.text+0xf004):md.c: undefined reference to `sync'
tcop/SUBSYS.o(.text+0x339d):postgres.c: undefined reference to `sigsetmask'
tcop/SUBSYS.o(.text+0x4e76):postgres.c: undefined reference to `sigmask'
tcop/SUBSYS.o(.text+0x4e8e):postgres.c: undefined reference to `sigsetmask'
tcop/SUBSYS.o(.text+0x50d1):postgres.c: undefined reference to `sigsetmask'
utils/SUBSYS.o(.text+0x76b64):miscinit.c: undefined reference to `kill'
../../src/port/libpgport.a(random.o)(.text+0x5):random.c: undefined
reference to `lrand48'
../../src/port/libpgport.a(getaddrinfo.o)(.text+0x185):getaddrinfo.c:
undefined reference to `gethostbyname@4'
../../src/port/libpgport.a(getaddrinfo.o)(.text+0x1c0):getaddrinfo.c:
undefined reference to `WSAGetLastError@0'
../../src/port/libpgport.a(getaddrinfo.o)(.text+0x3d0):getaddrinfo.c:
undefined reference to `inet_ntoa@4'
../../src/port/libpgport.a(srandom.o)(.text+0x5):srandom.c: undefined
reference to `srand48'
make[2]: *** [postgres] Error 1
make[2]: Leaving directory `/home/Owner/psql/postgresql-7.4.3/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/Owner/psql/postgresql-7.4.3/src'
make: *** [all] Error 2
BTW running on a windows XP home OS, 2.4ghz
I hope this is a useful error report.
If you'd like any further info or clarifications email me back and i'll try
to help.
For now I'm just going to try the Win32 install using Cygwin instructions.
CHeers.
Chris
_________________________________________________________________
Open an Online Savings Account today & collect a bonus $30*!
http://clk.atdmt.com/1DG/go/hsb005000991dg/direct/01/
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
- 2
- pgxs: build infrastructure for extensions v1
Have folks looked this over? Is this the direction we want to go?
---------------------------------------------------------------------------
Fabien COELHO wrote:
>
> Dear patchers,
>
>
> Please find attached a patch which provides a working infrastructure for
> pg extensions such as new gist-based indexes, functions, types...
>
> The infrastructure is a simple reworking of the already available internal
> infrastructure for contrib, so that it can be used outside of the
> postgresql source tree after installation, without gory details being in
> sight of the user...
>
> As a test case and show how, I provided new Makefile.pgxs for most contrib
> subdirectories. After postgresql has been configure, compiled and
> installed, simply try them with:
>
> "cd contrib/foo ; make -f Makefile.pgxs install"
>
>
> BEWARE: The patch does not include an update of "configure", as I do not
> have the same version of "autoconf". So configure must be regenerated:
> "autoconf configure.in > configure"
>
> There is an initial documentation in "pgxs.sgml".
>
>
> How it works:
>
> - necessary files (includes, scripts, makefiles...) are copied in lib/build
> on the initial "make install". The adds 2MB of stuff. The former
> installation can be obtained with "make light-install", but then
> no extensions could be added to the installation, so this is more for
> packagers that would like to provide a separate -dev package, IMHO.
>
> Due to gnu-make restriction on how its includes work, these files must
> be copied with the same directory structure as the pg source tree.
> The fact does not appear at all in the actual infrastructure from the
> user point of view, but it explains why subdirectories are necessary
> under the build subdir...
>
> - the makefile of any extension is expected to set macro PGXS to
> "pg_config --pgxs", to include a special pgxs.mk makefile, and to
> set some macros depending on what is to be built, just like in
> current contrib. See the examples under contrib.
>
> - I've added two PGXS-triggered conditionnals in Makefile.global,
> so that includes and libraries are taken where needed...
>
>
> It works for me.
>
>
> Questions and thoughts:
>
> - maybe more files should be copied? if so, which ones?
>
> - should this actually replace the current "contrib" infrastructure?
>
> I would tend to say "yes"... that would require to replace all makefiles
> there by the Makefile.pgxs version, to remove "contrib-global.mk", and
> also possibly to update some documentations.
>
> - more documentation?
> integration of the documentation wrt pg doc?
>
> - validation? one could thing of installing some contribs
> when "make check" is performed, so as to validate that the
> extension infrastructure is not broken?
>
>
> Have a nice day,
>
>
> --
> Fabien Coelho - email***@***.com
Content-Description:
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to email***@***.com
--
Bruce Momjian | http://candle.pha.pa.us
email***@***.com | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
- 3
- msession for PostgreSQL?As you may or may not be aware, I've been sort of ranting about high speed
frequently updated tables the last few days. Sorry if I've annoyed anyone.
It occured to me last night that PostgreSQL's recent capability of
returning sets of rows from functions was a feature that a long abandoned
project needed to really work.
Msession is a high speed session manager designed for PHP. It is not MVCC,
is is strictly RAM based. It allows for plugins and other sort of cool
features. Last time I tested it, it easily handled 4000 full
read/process/update sessions a second across hundreds of connections. I
haven't done any real development on it in well over a year, but it still
has a number of users.
Conceptially, it is kind of similar to LDAP, but designed to provide some
database-esque features. To emulate its functionality, you would do
something like this in PostgreSQL:
create table sessions(
session_name varchar,
session_data varchar,
last_access timestamp,
created timestamp
);
create table session_variables
(
session_name varchar,
variable_name varchar,
variable_value varchar
);
Basically, sessions are "world-unique." The variable "session_data" is
used by PHP for storing PHP's internal session information. The table
session_variables is typically used by non-PHP applications. Anyway, if
you are curious, about it, checkout the docs on the PHP website, or
checkout http://www.mohawksoft.com/devel/msession.html
The server is still around, and aside from some cleanup and bug fixes, it
could operate with a set of user loadable functions to provide some neat
features:
Looking at the above table declarations, one can do this:
SELECT * FROM session_variables WHERE session_name = 'foobar' ;
Would looks something like this:
SELECT msession_get_array('session');
SELECT session_name FROM sessions;
Looks like:
SELECT msession_list();
UPDATE session_variables SET session_variable='foo' where
session_name='bar' and variable_name='name';
Looks like:
msession_set('bar', 'name', 'foo');
The best part of it could be that it could replace the whole msession C
API with PostgreSQL. You can join against the various data, and it should
be very fast with no MVCC overhead for those aspects of your project that
don't need it while still allowing them to be incorporated with the data
that does.
Would anyone find this useful?
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
- 4
- About SortHi all,
I built a secondary index with a custom sort function. It works well
(I can traverse the index by the sort order). However, I wonder how to
traverse the index by a reverse order.
Is it possible?
Thanks.
- 5
- Re:On Mon, 2004-07-05 at 06:39, erdenemandal wrote:
> Hello,
>
>
>
> My name is Erdenemandal. I am using PostgreSQL and plpgsql language. I
> am wondering , is it possible to call shell programm from plpgsql
> language. I want to create XML file from Database.
>
>
>
> I mean I want to use plpgsql language for export settings (in
> database) in XML format.
There are two classes of procedural languages in PostgreSQL, safe and
unsafe. Safe procedural languages don't do anything with file systems,
email, etc... plpgsql is one of the safe languages. Unsafe languages
are allowed to do more dangerous things, like play with the file system
etc...
There's a stub called pl/sh out there somewhere that literally lets you
pretty much just call shell scripts from within postgresql. Any other
unsafe language will also let you do this, like tcl, perl, or php.
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to email***@***.com)
- 6
- Converting a bare number to an interval and backSalve.
I have an application in which I would like to convert a number of
seconds into an INTERVAL DAY TO SECOND value and, later, back to a
number of seconds. For reasons relating to inter-database portability,
I'd like to do this in a stored function, not in the database client
application.
Some time spent on google hasn't shown any good ways to approach this.
Any suggestions?
Owen
- 7
- (S)RPMS for 7.4.4 released.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
For RPM users, (S)RPMS for 7.4.4 was just built. We have (S)RPMS for:
* Red Hat Linux 9
* Fedora Core 1
* Fedora Core 2
* Red Hat Enterprise Linux 3
They will be available in main ftp site shortly, and in the mirrors after
the sync.
I've tested and installed all the rpms in production machines. If you find
out any problems with the RPMS, please do mail me.
Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFBIlXUtl86P3SPfQ4RAvpMAJ0V75S2u0RAKbgrxOgcO9ubfzAvwQCdFB+l
QrY8J6JbpA2CHi9JO2myENQ=
=c/TH
-----END PGP SIGNATURE-----
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to email***@***.com
- 8
- set current explain mode recommend indexeshi,
our db2advis is broken and i am trying to find other ways to get
recommended indexes
i tried using command "SET CURRENT EXPLAIN MODE RECOMMEND INDEXES" and
it populated ADVISE_INDEXES table. new indexes recommended by this
command does not have runstats on it.
how can i evaluate new suggested indexes ?
do i have to physically create these indexes and then explain my SQL ?
can i do it without actually creating suggested indexes ?
what is the difference between "SET CURRENT EXPLAIN MODE RECOMMEND
INDEXES"
and "SET CURRENT EXPLAIN MODE EVAULATE INDEXES"
they both seems to fill same kind of information in ADVISE_INDEXES
table.
please suggest me a way to get around functionality of db2advis
regards,
jag
- 9
- Bug Report -- information schema view is broken 'unrecognized privilege type: "RERERENCES"'
I haven't seen it mentioned, but I could have missed it. It seems like this
kind of thing must be known and probably fixed already? I'm actually still
using 7.4 beta 5. IIRC that was the last beta before the release and there
were no changes for 7.4.
db=> select table_name from information_schema.tables;
ERROR: unrecognized privilege type: "RERERENCES"
db=> \d information_schema.tables
View "information_schema.tables"
Column | Type | Modifiers
------------------------------+-----------------------------------+-----------
table_catalog | information_schema.sql_identifier |
table_schema | information_schema.sql_identifier |
table_name | information_schema.sql_identifier |
table_type | information_schema.character_data |
self_referencing_column_name | information_schema.sql_identifier |
reference_generation | information_schema.character_data |
user_defined_type_catalog | information_schema.sql_identifier |
user_defined_type_schema | information_schema.sql_identifier |
user_defined_name | information_schema.sql_identifier |
View definition:
SELECT current_database()::character varying::information_schema.sql_identifier AS table_catalog, nc.nspname::character varying::information_schema.sql_identifier AS table_schema, c.relname::character varying::information_schema.sql_identifier AS table_name,
CASE
WHEN nc.nspname ~~ like_escape('pg!_temp!_%'::text, '!'::text) THEN 'LOCAL TEMPORARY'::text
WHEN c.relkind = 'r'::"char" THEN 'BASE TABLE'::text
WHEN c.relkind = 'v'::"char" THEN 'VIEW'::text
ELSE NULL::text
END::information_schema.character_data AS table_type, NULL::information_schema.sql_identifier::information_schema.sql_identifier AS self_referencing_column_name, NULL::information_schema.character_data::information_schema.character_data AS reference_generation, NULL::information_schema.sql_identifier::information_schema.sql_identifier AS user_defined_type_catalog, NULL::information_schema.sql_identifier::information_schema.sql_identifier AS user_defined_type_schema, NULL::information_schema.sql_identifier::information_schema.sql_identifier AS user_defined_name
FROM pg_namespace nc, pg_class c, pg_user u
WHERE c.relnamespace = nc.oid AND u.usesysid = c.relowner AND (c.relkind = 'r'::"char" OR c.relkind = 'v'::"char") AND (u.usename = "current_user"() OR has_table_privilege(c.oid, 'SELECT'::text) OR has_table_privilege(c.oid, 'INSERT'::text) OR has_table_privilege(c.oid, 'UPDATE'::text) OR has_table_privilege(c.oid, 'DELETE'::text) OR has_table_privilege(c.oid, 'RULE'::text) OR has_table_privilege(c.oid, 'RERERENCES'::text) OR has_table_privilege(c.oid, 'TRIGGER'::text));
Note the "RERERENCES" in the last line of the view definition.
--
greg
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to email***@***.com so that your
message can get through to the mailing list cleanly
- 10
- Unable to revoke privileges from a userSome user accounts have been created some time ago and we have just
found out that they were given privileges they should not have.
However, I have no idea which account was used to create them and when
I use a DBA account to revoke these privileges I get the following
message: "ORA-01927: cannot REVOKE privileges you did not grant"
Any idea how to revoke these accesses?
- 11
- sql to get the column names of a tableHow can I get the column names of a table with sql ?
Thanks in advance
Alexander Antonakakis
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
- 12
- Problems with PLPGSQLHi,
I have a problem with quoting in one of my functions:
now TIMESTAMP := ''now'';
FOR myRec IN SELECT * FROM myTable WHERE job_end + ''360 Min'' > now LOOP
I want to replace the 360 with the contents of a passed value
but for some reason I can't quote it. ... job_end + ''$1 Min'' does not
work.
Could anyone help me out here ?
On the subject:
The whole quoting in PLPGSQL seems to create many people a headache...
is there any plan to make it a bit more user friendly?
Thanks
Alx
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to email***@***.com so that your
message can get through to the mailing list cleanly
- 13
- CLUSTER lockingHi,
Is there a way the CLUSTER command can be changed to not take an
exclusive lock on the table, and instead allow reads on the old table
and index, just preventing writes?
Chris
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to email***@***.com)
- 14
- Prioritizing queriesHas anyone investigated having either high, or low urgency queries? A
system I'm working on has a constant inflow of data, which has some
queries gainst it which might require long sequential scans. I'm not
that worried about how long those queries take, just that they don't
interfere with other insertions.
This is a bit DSSish, I guess, but I would think it could be managed
by nicing processes?
Chris
--
| Christopher Petrilli
| email***@***.com
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
- 15
- db2iupdtIs there any way to tell how long it would take to run this script to update
my DB2 instance from 32-bit to 64bit given the size of my database, or does
the database size even matter for this update?
**amy**
|
|
|