So, I want to insert new record and get immediately its sequence
value (serial column) (or OID). I Use iHTML web interface.
Now I have found out that I can give two queries in iHTML like this:
SQL ="SELECT nextval('koe_pkey_id') as val;
INSERT INTO koe (id, name) values (val, 'uusi');"
No
Hi,
What you'll really want is a disk array that is shared by 2 machines. The
primary database is allowed to modify the data in the array. When it dies,
the secondary database machine is allowed write access to it. This
basically how Oracle does things like this. Don't know if FreeBSD allows
y
Jim Mercer <[EMAIL PROTECTED]> writes:
> i was wondering if someone could tell me how, if possible, to implement
> a c function such that i can do:
>> SELECT makecrypt('secret', 'salt');
> or
>> SELECT makecrypt('secret');
> such that if salt is not specified, the c function would make one up.
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 during compile of f_
i've poked about and made a new function "makecrypt(plainpass, salt)", and
it works ok.
basically, it is just a hook to the unix crypt() function.
i was wondering if someone could tell me how, if possible, to implement
a c function such that i can do:
> SELECT makecrypt('secret', 'salt');
or
>
"Robert B. Easter" <[EMAIL PROTECTED]> writes:
> I compared /usr/local/pgsql/include with
> /usr/src/postgresql-7.0.3/src/include and found that the src has more
> include files so that I tried:
Yeah, we keep meaning to clean up the include-file situation so that you
have some chance of compiling
"Dan Wilson" <[EMAIL PROTECTED]> writes:
> I get the following error:
> NOTICE: plpgsql: ERROR during compile of f_auto_date near line 1
> "RROR: parse error at or near "
Just like that, eh? It looks like the parser is spitting up on a \r
in the function text. Try saving your script with Unix
If you look at my function definition, you can see that this is not within
the function body. This is the testing of the trigger which produces the
error. It's just a plain old SQL statment that initiates the trigger.
-Dan
- Original Message -
From: "Robert B. Easter" <[EMAIL PROTECTED
On Thursday 14 December 2000 21:10, Robert B. Easter wrote:
> 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: ERRO
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
> "RROR: parse error at or ne
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.
Here's
Hi,
>
> Secondly, how can i have stadistics of how many times an users has got
> into the privated directory. (any suggestion) Perhaps could be a script
> to write into the database. ?¿?
for this, you can use the standard Apache logfiles, if you don't need it
inside the Database.
For auth, I g
No. However an encoding "MULE_INTERNAL" would do almost what you want.
MULE_INTERNAL is compatible with EUC_CN and EUC_TW. So you could
create a table having EUC_CN and EUC_TW columns like this.
create table t1(euc_cn text, euc_tw text);
\encoding EUC_CN
insert into t1(euc_cn) values('text in EUC
Robert,
I am insert_username.* in contrib directory for reference. So far so good.
Sandeep
"Robert B. Easter" wrote:
> On Thursday 14 December 2000 18:54, Robert B. Easter wrote:
> > Trigger functions, no matter what language, have be RETURNS OPAQUE.
> >
> > Here is an example (in the Post
On Thursday 14 December 2000 18:54, Robert B. Easter wrote:
> Trigger functions, no matter what language, have be RETURNS OPAQUE.
>
> Here is an example (in the PostgreSQL docs):
> http://www.comptechnews.com/~reaster/postgres/triggers20290.htm
>
> Sorry I can't help more as I've never actually us
Robert,
Thanks. If you have any simple PL/pgSQL trigger that will also help.
Indirectly.
Sandeep
> Trigger functions, no matter what language, have be RETURNS OPAQUE.
>
> Here is an example (in the PostgreSQL docs):
> http://www.comptechnews.com/~reaster/postgres/triggers20290.htm
>
> Sorr
Trigger functions, no matter what language, have be RETURNS OPAQUE.
Here is an example (in the PostgreSQL docs):
http://www.comptechnews.com/~reaster/postgres/triggers20290.htm
Sorry I can't help more as I've never actually used C triggers, just PL/pgSQL
ones.
On Thursday 14 December 2000 18:
On Thu, 14 Dec 2000, Soma Interesting wrote:
> I'm using PHP & PostgreSQL.
>
> All values called from the database are still padded with extra spaces from
> the column size in the database. Is this normal - I don't remember this
> happening when I was using MySQL. I thought usually the database s
I am trying to use "triggers". I get an error after "create trigger".
Does anybody know why?
create function insert_into_db2 RETURNS int AS
'/work/posgresql/lib/libpq.so' language 'C';
create trigger trial before insert or update on db1user for each row
execute procedure insert_into_db2();
Make your fields to be varchar(x), not char(x)
-alex
On Thu, 14 Dec 2000, Soma Interesting wrote:
> I'm using PHP & PostgreSQL.
>
> All values called from the database are still padded with extra spaces from
> the column size in the database. Is this normal - I don't remember this
> happenin
I'm using PHP & PostgreSQL.
All values called from the database are still padded with extra spaces from
the column size in the database. Is this normal - I don't remember this
happening when I was using MySQL. I thought usually the database stripped
the extra spaces when it retrieved the value
which just happens to be a sym link all to the same dir :)
jeff
On Mon, 11 Dec 2000, Tim Barnard wrote:
>
> >
> > We have some demographics available at http://www.pgsql.com/user_gallery
> >
>
>
> I believe what was intended was:
>
> http://www.pgsql.com/register
>
> Tim
>
>
Jeff MacD
* [EMAIL PROTECTED] <[EMAIL PROTECTED]> [001214 13:20] wrote:
> A staight forward question:
>
>Is "libpq" thread-safe??
>
> And an elaboration:
>
>I want to write a server that opens-up a number of connections
>to a PostgreSQL database, and then spawns threads handing a connection
23 matches
Mail list logo