> On 10/1/07, Jon Horsman <[EMAIL PROTECTED]> wrote:
> > ... Is there an elegant way i can set the username
> > to be the extension of the current row ...
>
> UPDATE usertable
> SET username = extension
> WHERE username IS NULL;
Hmm, that simple eh, don't
I guess what i'm looking for is something like the following, but i
don't know how i'd do it.
"UPDATE usertable SET username='SELECT extension FROM usertable WHERE
id=' WHERE username ISNULL",
Is this possible?
Thanks,
Jon.
On 10/1/07, Jon Horsman <[E
Hey,
I'm updating the user table in our db to have a new column "username"
as follows.
ALTER TABLE usertable ADD COLUMN username varchar(64)
UPDATE usertable SET username='' WHERE username ISNULL
ALTER TABLE usertable ALTER COLUMN username SET NOT NULL
ALTER TABLE usertable ADD CONSTRAINT usertabl
seems to be getting unloaded
occasionally.We have logs in the _init( ) and _fini( ) of the
library and we see that there are times when _fini( ) is getting
called when you wouldn't expect it to be.
Has anyone else had issues similar to this?
Thanks,
Jon.
On 8/15/07, Jon Horsman &l
> "Jon Horsman" <[EMAIL PROTECTED]> writes:
> > I'm randomly having issues with my triggers not firing (it turns out
> > they are getting removed) and when i turned INFO logs on i saw the
> > following
>
> > 2007-08-14 13:41:44.740305500 LOCATION
I have a shared library loaded into postgresql using
CREATE FUNCTION medbevent() RETURNS trigger as
'/usr/lib/pgsql/libmedbevent.so' language 'C';
I'm randomly having issues with my triggers not firing (it turns out
they are getting removed) and when i turned INFO logs on i saw the
following
200
Thanks for the help guys, i'll try your suggestions when i get a chance.
Jon.
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
with host = 127.0.0.1 and then
about 90% of all the processes are running as [local]. What does
[local] mean, since in fact 127.0.0.1 is obviously local, how do they
differ?
Thanks,
Jon.
On 7/30/07, Jon Horsman <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a server running postgre
Hello,
I have a server running postgres 7.4.13 and am starting to see errors
"FATAL: connection limit exceeded for non-superusers".
I'm not sure which one of my applications are hogging all of the
connections, is there a way debug this somehow?
Thanks,
Jon.
---(end of
use a pre-insert triggers - one for each table. include something like
I ended up going this route and it seems to work. Thanks for the help
from all. I figured i'd post the solution to the list so it shows up
when googled. Also, if my solution can be simplfied i'd appreciate
knowing how.
Th
Subqueries are not allowed in check constraints.
I hadn't tried this yet but i'm sure i would have figured this out
quickly then =)
Thanks,
Jon
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
Perhaps this...? It would work, but depending how many rows are in the
table, it could become incredibly slow.
The max rows in either table would be about 1000 or so, which isn't
too many. There also should be a hole lot of inserting going on.
ALTER TABLE table1 ADD CHECK (extension NOT IN (S
> create table table1 (
> id SERIAL PRIMARY KEY
> extension UNIQUE,
I can't find anything about this syntax in the docs...
Oops, i'm missing a comma on that first line, should have been:
create table table1 (
id SERIAL PRIMARY KEY,
extension UNIQUE,
)
I think, you should write a TRIGGER for
I was wondering if someone could help point me in the right direction
w.r.t. foreign unique constraints. I'm working on a legacy database
and have a new requirement and am not sure how to do it.
I have something like this
create table table1 (
id SERIAL PRIMARY KEY
extension UNIQUE,
)
create
I ended up going the pg_catalog route, something like (off the top of
my head without a linux machine by to test it)
output=$(psql -d template1 -t -c "select * from pg_database where
datname='testdb'")
if [ -z "$output" ]; then
psql createdb testdb
else
echo 'the db already exists'
fi
I did the
For more information, i know how this is done using the pg_catalog but
have yet to find out how its done with the information schema.
select * from pg_catalog.pg_database where datname='test'
will work for me but i can't find a solution with the IS. I'd prefer
to use the IS if its as easily don
In my original email i forgot to mentioned i need to know if the
database exists or not from the shell script. If it doesn't exist i
would then create it. Currently i was just creating the db everytime
our db script is run (since it doesn't hurt the db) but this generates
the 'db already exists'
Thanks for the suggestions guys, i'll give this a try.
Jon
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
Hey,
I'm trying to figure out how i can query the postgres information
schema from a bourne shell script on linux. I need to know if a
user/table exists. Does someone mind giving me a quick example of how
this works, is this possible?
Thanks,
Jon.
---(end of broadcast
Hey All,
I'm new to postgres and am wondering what the recommended way of
creating an automated db creation script is. I've reading the
postgres 8.1 manual but haven't seen much on this and google doesn't
seem to be bringing up much either.
I need to create a script that will create a database
20 matches
Mail list logo