Archive for the ‘PostgreSQL’ Category


>

A problem that occurs very often the error message “Access is prohibited for safety reasons,” which occurs when a user tries to access a blank password, a common (presumably well-protected) on development machines. For such access, set [‘extra_login_security’] to FALSE in the conf/config.inc.php.

[‘extra_login_security’] = false;


>

Here is the good PDF file which explains how to install PostgreSQL in WAMP server.

Installing-WampServer2-0c-With-PostgreSQL

If you are using php 5.2.6, there is some problem in adapter of php5.2.6, thats it is unable connect to PostgreSQL. For making connection we are using adapter of php5.2.5. you can download dll files using below link if you dont find in online.

php5.2.4 dll files


Here is the good PDF file which explains how to install PostgreSQL in WAMP server.

Installing-WampServer2-0c-With-PostgreSQL

If you are using php 5.2.6, there is some problem in adapter of php5.2.6, thats it is unable connect to PostgreSQL. For making connection we are using adapter of php5.2.5. you can download dll files using below link if you dont find in online.

php5.2.4 dll files


>A lot of people are wondering why date/time functions are working differently in PostgreSQL 7.2 and up. For example queries like the following no longer work:

CODE:1
SELECT id FROM orders
WHERE interval(current_timestamp – order_date) < interval(‘1 month’);

INTERVAL is really not a function. It is a datatype and an operator. In earlier version of PostgreSQL, you were allowed to ‘sort of’ use it as a function, but that no longer exists. Instead, try to either:

CODE:2 cast your value to an interval datatype:

SELECT id FROM orders
WHERE (current_timestamp – order_date) < (‘1 month’)::interval;

CODE :3 you can use the “interval” keyword as an operator to a timestamp representation:

SELECT id FROM orders
WHERE (current_timestamp – order_date) < (interval ‘1 month 3 days’);

CODE :4 it works with parentheses if you remove any ambiguity about the parentheses. (Meaning: if you need parentheses for your expression, then put “interval” in quotes:

SELECT id FROM orders
WHERE (current_timestamp – order_date) < (“interval” (current_timestamp –
      (SELECT order_date FROM orders WHERE id = 2)));