Started 1 month, 1 week ago (2009-11-26 03:42:00)
by shammat
Quote:
Originally Posted by helloworld7
If you have a field in select then you need to identify on the group as well.
Which is true for all databases except MySQL. MySQLs "relaxed" way of dealing with
GROUP BY ignores the standard and the fact that not having those columns in the group by can return undefined results....
Started 5 days, 5 hours ago (2009-12-28 04:35:00)
by shammat
You can either set an
environment variable to hold the password or create a password file.
Details are here:
http://www.postgresql.org/docs/current/static/li bpq-envars.html
http://www.postgresql.org/docs/current/static/li bpq-pgpass.html
Started 5 days, 8 hours ago (2009-12-28 01:42:00)
by vetrivel
Quote:
Originally Posted by vetrivel
this below query takes short time to bring the output .
EXPLAIN ANALYZE select sum(count) from ( select count(accseqno) from acc_axs_log a where exists (SELECT callid from acc_axs_log b where ( b.stime between '10:0:00' and '12:
59:59' and b.sdate between '22/12/2009' and '26/12/2009' and b....
Started 1 week, 3 days ago (2009-12-23 08:28:00)
by shammat
Quote:
Originally Posted by yogi1410
i found that there are no conf file installed.
The conf file is created when you run initdb. So you need to included that somehow in your installation process.
I have no experience with the msi installer, but you can simply use the zip
binaries, extract them and run initdb ...
Started 1 week, 3 days ago (2009-12-22 20:16:00)
by artacus72
Easiest way would be to just run the following query and past results back into query window and rerun.
Code:
SELECT 'ALTER TABLE ' || c.table_schema || '.' || c.table_name ||
' ALTER COLUMN datecreated {SET DEFAULT now()};'
FROM information_schema.columns c
WHERE table_schema = 'public'
AND column_name = 'datecreated'
If you need to make it
self contained, then you'll need to...
Started 1 week, 4 days ago (2009-12-22 05:09:00)
by MILMIL MILMIL is offline Registered User
Hello everyone.
I am in the final stage in completing my postgraduate thesis LBS & mobile GIS application.
I have a web server application (restlet style), a google android client and a postgres/postgis DB. I am using postgres plus ver 8.3. The web server and the postgres server are installed on a IBM lenovo T500 notebook, 4G RAM, 2,80 GHz
intel core duo, on windows XP PRO O/S
For a ...
Started 1 month, 1 week ago (2009-11-24 01:20:00)
by artacus72
Not much difference. The database itself is the same, they just bundle apache, php and some other stuff. It is released under the same as
Postgres so there is no harm in using that one.
Started 2 weeks, 4 days ago (2009-12-14 12:52:00)
by manikandan.c manikandan.c is offline Registered User
DECLARE
--TYPE RECORD IS REFCURSOR;
v_
CheckIn numeric(5);
BEGIN
IF(TG_OP = 'INSERT') THEN
SELECT count(check_in) INTO v_checkin FROM hm_room_status
WHERE ( check_in <= new.check_out AND check_out >= new.check_out )
AND (status_list ='CheckIn' or status_list = 'Reservation')
AND hm_room_details_id = new.hm_room_details_id;
IF(v_checkin >= 1 ) THEN...
Started 1 week, 5 days ago (2009-12-21 04:51:00)
by shammat
As Latin1 is convertible to UTF8, a simple pg_dump and pg_restore should be enough
Check the manual for details:
http://www.
postgresql.org/docs/current/static/ba ckup-dump.html
Started 2 weeks, 3 days ago (2009-12-16 03:33:00)
by shammat
To
populate a variable from a SELECT statement use the INTO keyword.
As far as I can tell the equivalent would be:
Code:
CREATE OR REPLACE FUNCTION foo(AccountID int )
RETURNS TABLE (accountid int, accountcompanyname character varying, smalllogoid int)
AS
$$
DECLARE country_id int;
BEGIN
SELECT CountryID
INTO country_id
FROM tblAccount
WHERE ...