Easier to read... login, logout
On Wed, Nov 24, 2010 at 8:45 AM, Szymon Guz wrote:
> no
> Why do you want to do anything like that?
>
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-genera
Hey Alexander,
Ordinal positions of columns can't be set manually by ALTER TABLE.
2010/11/24 Alexander Farber
> Hello,
>
> is there a syntax to add a column not at the last place, but
> somewhere inbetween or do I have to dump/restore the table?
>
> For example if I'd like to add last_logout ri
Alexander Farber, 24.11.2010 08:42:
is there a syntax to add a column not at the last place
No, because the order of the column is irrelevant (just as there is no order on
the rows in a table)
Simply select them in the order you like to have.
Thomas
--
Sent via pgsql-general mailing list (p
On 24 November 2010 08:42, Alexander Farber wrote:
> Hello,
>
> is there a syntax to add a column not at the last place, but
> somewhere inbetween or do I have to dump/restore the table?
>
> For example if I'd like to add last_logout right after last_login:
>
> \d pref_users;
>Tab
Hello,
is there a syntax to add a column not at the last place, but
somewhere inbetween or do I have to dump/restore the table?
For example if I'd like to add last_logout right after last_login:
\d pref_users;
Table "public.pref_users"
Column |Type |
Hello,
Does calling a pl/python function from each database connection load the
python interpreter each time? what are the effects of using pl/python
function in a environment where no. of concurrent connections are more and
each user calls a pl/python function?
Please give the details about how p
On 11/23/10 12:34 PM, akp geek wrote:
Hi -
This is related to my earlier post. For the function I am
passing a string. But the string some time has a single quote inside
the string like "IT's a String Test" , How can I handle that, can you
please help?
at the SQL level, pass it
Hello
2010/11/23 akp geek :
> Hi -
> This is related to my earlier post. For the function I am passing
> a string. But the string some time has a single quote inside the string like
> "IT's a String Test" , How can I handle that, can you please help?
on stored procedure level you can d
On 11/22/2010 03:32 PM, Adarsh Sharma wrote:
Dear all,
I am reading about Dialects of different databases. Yet I can't
understand what is the need of dialect in Postgres or any other like
Hibernate uses Dialect of all Databases for ORM.
What is it &
How can we create our own Dialect ?
If you h
I used pg_catalog.replace, it worked. Thanks for the help
On Tue, Nov 23, 2010 at 3:32 PM, Pavel Stehule wrote:
> Hello
>
> it working on my comp
>
> postgres=# select mystr, test_repl(mystr) replaced_strfrom str_table;
> mystr | replaced_str
> --
On Mon, 22 Nov 2010 13:43:14 +0100, Magnus Hagander
wrote:
Hmm. That's a simple SEC_E_LOGON_DENIED. Simply meaning
usedname/password is incorrect. The security eventlog on the server
(or domain controller) might have more information around it. If not,
I'm not sure what's wrong there - if it hap
Thanks for that - yes very helpful. Good to know what is possible.
Dan
On Tue, 2010-11-23 at 10:27 +0100, Matthieu Huin wrote:
> A similar question was discussed here about 3 weeks ago :
> http://archives.postgresql.org/pgsql-general/2010-11/msg00110.php
>
> The "UPSERT" facility not being impl
Hi -
This is related to my earlier post. For the function I am passing
a string. But the string some time has a single quote inside the string like
"IT's a String Test" , How can I handle that, can you please help?
CREATE OR REPLACE FUNCTION test_repl(x character varying)
RETURNS c
Hello
it working on my comp
postgres=# select mystr, test_repl(mystr) replaced_strfrom str_table;
mystr | replaced_str
---+--
This road is INDEFLY CLSD | This road is indefinitely closed
That is INDEFLY open
Hey David,
I guess, that you should escape, like this
dmitigr=> SELECT regexp_replace('di_ma%', '(%|_)', E'\\1', 'g');
regexp_replace
di\_ma\%
2010/11/23 David Sheldon
> If I have a string, and I want to search for everything that starts with
> that string then I could
CREATE OR REPLACE FUNCTION test_repl(x character varying)
RETURNS character varying AS
$BODY$
DECLARE
ret_var varchar(4000);
a record;
begin
ret_var := x;
for a in select * from lookup
loop
ret_var := replace(ret_var,a.code,a.codeword);
end loop;
return ret_var;
END;
$BODY$
LANGUAGE 'plpgsql
Hello
please, can you send a source code of your function?
Regards
Pavel Stehule
2010/11/23 akp geek :
> Dear all -
> I am having trouble with replace function inside a function.
> If I do the same replace function outside it works fine, Following example
> clearly explains my
Dear all -
I am having trouble with replace function inside a function.
If I do the same replace function outside it works fine, Following example
clearly explains my problem. Can you please help?
create table str_table
( mystr varchar(1000));
insert into str_table values ( 'Thi
A similar question was discussed here about 3 weeks ago :
http://archives.postgresql.org/pgsql-general/2010-11/msg00110.php
The "UPSERT" facility not being implemented yet, I don't think it is
possible to do much better than what you came up with.
Assuming the column(s) holding the distinctiv
On 22 November 2010 14:05, Bruce Momjian wrote:
> Magnus Hagander wrote:
>> On Sat, Nov 20, 2010 at 16:54, Bruce Momjian wrote:
>> > Elliot Chance wrote:
>> >> > Also, if someone registers on the forum, do they get a major domo
>> >> > registration email? ?And if so, would this be set to receive
If I have a string, and I want to search for everything that starts with
that string then I could do:
SELECT * FROM users WHERE name LIKE string || '%';
Now, if string contains \, _ or % then it won't do what I expect.
Is there a built-in function that I can call to escape the string so
that
Jen,
Regarding the first point, is postgres actually running? You can check this
by typing the following at a terminal -
ps -ef|grep postgres
Reload configuration is used to tell PostgreSQL to read in the configuration
file for any chances since the database started. If you want to start the
d
Hi Everyone,
When I create a prepared statement like this in java (using JDBC):
pStmt = conn.prepareStatement(qry);
everything works ok. However when I want a scrollable resultset and use this:
pStmt = conn.prepareStatement(qry,ResultSet.TYPE_SCROLL_INSENSITIVE);
I get a syntax error:
org.pos
"Gauthier, Dave" writes:
> I have an update trigger on a table that in turn updates other records of
> that same table. I need to be able to discern between when a user is
> updating a record in the table vs when the update trigger is reflexively
> calling itself. Is there an elegant way to d
Hi:
I have an update trigger on a table that in turn updates other records of that
same table. I need to be able to discern between when a user is updating a
record in the table vs when the update trigger is reflexively calling itself.
Is there an elegant way to do this?
Thanks in Advance
Hello,
Does calling a pl/python function from each database connection load the
python interpreter each time? what are the effects of using pl/python
function in a environment where no. of concurrent connections are more and
each user calls a pl/python function?
Please give the details about how p
I am getting the following error when I go to Application -> PostgreSQL ->
Reload Configuration
"
Please enter your password if requested.
pg_ctl: PID file "/home/Jen/Installed/PostgreSQL/data/postmaster.pid" does
not exist
Is server running?
Press to continue...
"
I have installed Postgresql f
Armand Turpel writes:
> A project in which i'm involved, make use of json data type for storing
> some data sets. I have read that there is some work in progress to
> implement json datatype support in postgres. So my question is; when and
> in which version of postgres we can expect this impl
On Tue, Nov 23, 2010 at 4:42 AM, Mark Gabriel Paylaga
wrote:
> When two requests are received at the same time, both of the requests will
> use the same db connection resulting in an error:
> Started transaction while transaction still
> active
>
>
You have multiple threads sharing the same conn
On Tue, Nov 23, 2010 at 02:09:19PM +1030, Dan Kortschak wrote:
> I want to be able to insert,
> uniquely, biological sequences into a table returning the sequence id -
> this part is fine. However, if the sequence already exists in the table
> I want to return to id.
The term you're looking for is
On 2010-11-22 20.41, anypossibility wrote:
Server: OS X 10.5
PostgreSQL version: 8.3
We experience this connection maxing out once in the full moon.
The request from client reaches to the server but client never receive response
back.
The queries are very simple update on one record or selec
On 23/11/2010 09:34, Mike Christensen wrote:
I'd be interested in
knowing what functionality would come with a JSON data type, like
could you query for all rows with an X property of> 5 or something,
eg {Y: 1, X: 6}
Yes, as far as i know, you can make queries on json content
#
Hi,
Regarding connection pooling...
I may actually not need connection pooling...
I have one service to write to db. The service receives one or more requests
at the same time from different modules.
When two requests are received at the same time, both of the requests will
use the same db conne
Sim, are you sure that encoding of the dump and the database
in which you are trying to restore it are same ?
2010/11/23 Sim Zacks
> Thanks for your help.
>
> I think a trigger will actually be the easiest. The way i can tell if there
> is invalid data is simply to do an Upper(text) and if it h
Thanks for your help.
I think a trigger will actually be the easiest. The way i can tell if
there is invalid data is simply to do an Upper(text) and if it has
invalid data it fails.
I dumped the fixed database. Now I have a years worth of backups that I
can't restore a specific table from. I
> A project in which i'm involved, make use of json data type for storing
> some data sets. I have read that there is some work in progress to implement
> json datatype support in postgres. So my question is; when and in which
> version of postgres we can expect this implementation?
I actually st
Hi,
A project in which i'm involved, make use of json data type for storing
some data sets. I have read that there is some work in progress to
implement json datatype support in postgres. So my question is; when and
in which version of postgres we can expect this implementation?
Thanks,
atu
37 matches
Mail list logo