Re: [BUGS] BUG #2905: min and max return incorrect text type
Adriaan van Os wrote: > > The following bug has been logged online: > > Bug reference: 2905 > Logged by: Adriaan van Os > Email address: [EMAIL PROTECTED] > PostgreSQL version: 8.1.4 > Operating system: Mac OS X 10.4.6, intel > Description:min and max return incorrect text type > Details: > > Table 9-37. Aggregate Functions in the Postgres docs states that the return > type for min and max is the "same as argument type". > > However, min(VARCHAROID) and max(VARCHAROID) return TEXTOID as a result > type. Yea, they are internally treated as very similar types. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [BUGS] BUG #2904: COPY FROM -> permisson denied
"Izsak Rudolf" <[EMAIL PROTECTED]> writes: > Operating system: Fedora Core 6 > Description:COPY FROM -> permisson denied > I wanted to COPY the content of the sample data file /home/csakmost.txt to > my data table t_crdc1 using the following command: > exp03038=# COPY t_crdc1 FROM '/home/csakmost.txt' WITH DELIMITER ' ' NULL > 'NULL'; > But I have got the error message: > ERROR: could not open file "/home/csakmost.txt" for reading: Hozzáférés > megtagadva > I have set the permissons of the file "/home/csakmost.txt" also, so that it > can be read by any users (both of the file and the directory). Also if I try > to read the file as user postgres, it works: You're getting burnt by SELinux restrictions: network-accessible daemons such as postgresql are normally constrained to not be able to read or write portions of the filesystem outside what they're "supposed" to be touching, which for postgres is just /var/lib/pgsql/. This is considered a good thing since it limits the damages if someone is able to subvert one of those server processes. The quick answer might be to temporarily turn off SELinux (see "setenforce") while you load the file. A more security-aware approach would be to modify the SELinux policy to let postgres read some chosen directory for dropping files-to-load into. regards, tom lane ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] BUG #2848: information_schema.key_column_usage
This has has been fixed in CVS HEAD and 8.2.X will get the fix if the drop and recreate the view, or initdb. --- Tom Lane wrote: > Laurence Rowe <[EMAIL PROTECTED]> writes: > >> I have the following query: > >> > >> SELECT key_column_usage.*,constraint_type > >> FROM information_schema.key_column_usage > >> LEFT JOIN information_schema.table_constraints USING > >> (table_schema,table_name,constraint_name) > >> WHERE table_schema='whatever' and table_name='whatever' > >> ORDER BY constraint_type, constraint_name, ordinal_position > >> > >> This works when I am logged on as 'postgres', but if I try it after logging > >> on with a different username it fails with "ERROR: relation with OID 18635 > >> does not exist". > > Hmph ... I recall being unable to reproduce this before, but I'm not > sure why I failed, because it's definitely broken. The key_column_usage > view has > > FROM pg_namespace nr, pg_class r, pg_namespace nc, >pg_constraint c > WHERE nr.oid = r.relnamespace > AND r.oid = c.conrelid > AND nc.oid = c.connamespace > AND c.contype IN ('p', 'u', 'f') > AND r.relkind = 'r' > AND (NOT pg_is_other_temp_schema(nr.oid)) > AND (pg_has_role(r.relowner, 'USAGE') > OR has_table_privilege(c.oid, 'SELECT') > OR has_table_privilege(c.oid, 'INSERT') > OR has_table_privilege(c.oid, 'UPDATE') > OR has_table_privilege(c.oid, 'REFERENCES')) ) AS ss > > Obviously those last four lines should be r.oid not c.oid. The bug is > masked as long as the preceding pg_has_role() test succeeds, so in > particular a superuser would never see it :-( > > We won't be able to force initdb to fix this in the back branches, > but fortunately the information schema views are not hardwired in. > Just drop the view and recreate it with the corrected definition... > > regards, tom lane > > ---(end of broadcast)--- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[BUGS] BUG #2907: pg_get_serial_sequence quoting
The following bug has been logged online: Bug reference: 2907 Logged by: Adriaan van Os Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.4 Operating system: Mac OS X 10.4.6, intel Description:pg_get_serial_sequence quoting Details: In order to work with capitals (etc.), the table_name parameter of pg_get_serial_sequence needs double quotes inside single quotes, the column_name parameter requires a name within single quotes only. ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
[BUGS] BUG #2912: postgres database connectivity
The following bug has been logged online: Bug reference: 2912 Logged by: Aravind Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0 Operating system: Suse linux Description:postgres database connectivity Details: when the postgres database is connected through pgadminIII the connection tells Fatal error: Already roo many clients. ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
[BUGS] BUG #2908: ISO8601 Date / Time Format Incompatibility
The following bug has been logged online: Bug reference: 2908 Logged by: David Lloyd Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1 Operating system: Solaris 10 Description:ISO8601 Date / Time Format Incompatibility Details: According to the ISO standard, 8601: -- Fractions may also be used with any of the three time elements. These are indicated by using the decimal point (either a comma (which is preferred) or dot). -- http://en.wikipedia.org/wiki/ISO_8601 [Follow the links to one of the PDF standards from there] However, inserting such a value gives an error: lloy0076=# create table tstest(t timestamp); CREATE TABLE lloy0076=# insert into tstest values('2006-01-01 10:00:00,5'); ERROR: invalid input syntax for type timestamp: "2006-01-01 10:00:00,5" lloy0076=# in Notice the "invalid" input syntax. Thanks, DSL ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[BUGS] BUG #2910: Setting timestamps to null doesn't work with PDO
The following bug has been logged online: Bug reference: 2910 Logged by: Michael Vogel Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.1 Operating system: Windows Description:Setting timestamps to null doesn't work with PDO Details: Hi! We are having problems, setting timestamp fields to "Null" with PDO (Visual Basic 6) The following code doesn't work, it reports an invalid date/time-value. - strSql = "Select * From auftrag Where nummer In('0131') Order By nummer" Set ds1 = objHMVBDV.ADOConnection.OpenRecordset(strSql, adOpenDynamic, adLockOptimistic) ds1.Fields("erloeseaufgebautam") = Null ds1.Update Set ds1 = Nothing - Setting the field to "null" with an SQL-statement works ("update ..."). It doesn't work with 8.2.0 and 8.2.1 but does work with 8.0.x. The server is running under Linux in version 8.2.0, the clients are running Windows XP. Michael ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[BUGS] PostgreSQL & Slackware
I am having problems for compiler PostgreSQL 8.2.0 in Slackware 11.0. I used this parameters in configure: % ./configure --with-includes=/usr/src/linux/include showing after the error: ... configure: using CFLAGS=-O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing checking whether the C compiler still works... yes checking how to run the C preprocessor... /lib/cpp configure: error: C preprocessor "/lib/cpp" fails sanity check See `config.log' for more details. ... % In config.log: === This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by PostgreSQL configure 8.2.0, which was generated by GNU Autoconf 2.59. Invocation command line was $ ./configure --with-includes=/usr/src/linux/include ## - ## ## Platform. ## ## - ## hostname = darkstar uname -m = i586 uname -r = 2.4.33.3 uname -s = Linux uname -v = #6 Fri Sep 1 04:15:45 CDT 2006 /usr/bin/uname -p = k6-2 /bin/uname -X = unknown /bin/arch = i586 /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/sbin PATH: /usr/sbin PATH: /sbin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/X11R6/bin PATH: /usr/games PATH: /opt/openoffice.org2.0/program PATH: /opt/netbeans-5.5/bin PATH: /opt/eclipse PATH: /opt/jude_community/bin PATH: /opt/datastudio/bin PATH: /opt/www/htdig/bin PATH: /usr/lib/java/bin PATH: /usr/lib/java/jre/bin PATH: /opt/kde/bin PATH: /usr/lib/qt/bin ## --- ## ## Core tests. ## ## --- ## configure:1408: checking build system type configure:1426: result: i586-pc-linux-gnu configure:1434: checking host system type configure:1448: result: i586-pc-linux-gnu configure:1458: checking which template to use configure:1558: result: linux configure:1700: checking whether to build with 64-bit integer date/time support configure:1732: result: no configure:1739: checking whether NLS is wanted configure:1774: result: no configure:1782: checking for default port number configure:1812: result: 5432 configure:2123: checking for gcc configure:2139: found /usr/bin/gcc configure:2149: result: gcc configure:2170: checking for C compiler version configure:2173: gcc --version &5 gcc (GCC) 3.4.6 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... configure:3247: $? = 0 configure:3250: test -s conftest.o configure:3253: $? = 0 configure:3272: checking how to run the C preprocessor configure:3307: gcc -E -D_GNU_SOURCE conftest.c In file included from /usr/include/bits/posix1_lim.h:153, from /usr/include/limits.h:144, from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:122, from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/syslimits.h:7, from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:11, from conftest.c:13: /usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory configure:3313: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "PostgreSQL" | #define PACKAGE_TARNAME "postgresql" | #define PACKAGE_VERSION "8.2.0" | #define PACKAGE_STRING "PostgreSQL 8.2.0" | #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" | #define PG_VERSION "8.2.0" | #define DEF_PGPORT 5432 | #define DEF_PGPORT_STR "5432" | /* end confdefs.h. */ | #ifdef __STDC__ | # include | #else | # include | #endif |Syntax error configure:3307: gcc -E -D_GNU_SOURCE conftest.c In file included from /usr/include/bits/posix1_lim.h:153, from /usr/include/limits.h:144, from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:122, from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/syslimits.h:7, from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:11, from conftest.c:13: /usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory configure:3313: $? = 1 configure: failed program was: | /* confdefs.h. */ | | #define PACKAGE_NAME "PostgreSQL" | #define PACKAGE_TARNAME "postgresql" | #define PACKAGE_VERSION "8.2.0" | #define PACKAGE_STRING "PostgreSQL 8.2.0" | #define PACKAGE_BUGREPORT "pgsql-bugs@postgresql.org" | #define PG_VERSION "8.2.0" | #define DEF_PGPORT 5432 | #define DEF_PGPORT_STR "5432" | /* end confdefs.h. */ | #ifdef __STDC__ | # include | #else | # include | #endif |Syntax error configure:3307: gcc -E -traditional-cpp -D_GNU_SOURCE conftest.c In file included from /usr/include/featur
[BUGS] BUG #2913: Subscript on multidimensional array yields no value
The following bug has been logged online: Bug reference: 2913 Logged by: Roman Nowak Email address: [EMAIL PROTECTED] PostgreSQL version: 8.2.1 Operating system: Windows XP Description:Subscript on multidimensional array yields no value Details: SELECT (ARRAY[[1,2],[3,4]])[1]; does not return [1,2] (testes in psql and pgAdmin III): show info that one row was returned but does not display its value following statment works OK btw SELECT (ARRAY[[1,2],[3,4]])[1:1]; ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] BUG #2906: slow windows network performance
jose fuenmayor wrote: Use linux mac or any other unix like operating system, it performs better in every aspect. Thank you for your wonderful advice, but this is really a bug report. Adriaan van Os ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [BUGS] BUG #2905: min and max return incorrect text type
Bruce Momjian wrote: Adriaan van Os wrote: The following bug has been logged online: Bug reference: 2905 Logged by: Adriaan van Os Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.4 Operating system: Mac OS X 10.4.6, intel Description:min and max return incorrect text type Details: Table 9-37. Aggregate Functions in the Postgres docs states that the return type for min and max is the "same as argument type". However, min(VARCHAROID) and max(VARCHAROID) return TEXTOID as a result type. Yea, they are internally treated as very similar types. But "internally treated as very similar" is still not "same as argument type". Computing requires exactness. Adriaan van OS ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [BUGS] BUG #2912: postgres database connectivity
Hi, On Fri, 2007-01-19 at 11:07 +, Aravind wrote: > PostgreSQL version: 8.0 > Operating system: Suse linux > Description:postgres database connectivity > Details: > > when the postgres database is connected through pgadminIII the > connection > tells Fatal error: Already roo many clients. This is not a bug -- Increase the max_connections parameter in postgresql.conf, and restart PostgreSQL. Regards, -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/ signature.asc Description: This is a digitally signed message part
Re: [BUGS] PostgreSQL & Slackware
Hi, On Fri, 2007-01-19 at 04:18 -0800, Milton César de Souza Leite wrote: > configure: error: C preprocessor "/lib/cpp" fails sanity check AFAIR, you need to install gcc-g++ package for Slackware to get rid of this error. Regards, -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/ signature.asc Description: This is a digitally signed message part
Re: [BUGS] BUG #2907: pg_get_serial_sequence quoting
Adriaan van Os wrote: > > The following bug has been logged online: > > Bug reference: 2907 > Logged by: Adriaan van Os > Email address: [EMAIL PROTECTED] > PostgreSQL version: 8.1.4 > Operating system: Mac OS X 10.4.6, intel > Description:pg_get_serial_sequence quoting > Details: > > In order to work with capitals (etc.), the table_name parameter of > pg_get_serial_sequence needs double quotes inside single quotes, the > column_name parameter requires a name within single quotes only. I can confirm this is still a problem in current CVS: test=> CREATE TABLE "Test" ("Xx" SERIAL); NOTICE: CREATE TABLE will create implicit sequence "Test_Xx_seq" for serial column "Test.Xx" CREATE TABLE test=> SELECT pg_get_serial_sequence('Test', 'xX'); ERROR: relation "test" does not exist test=> SELECT pg_get_serial_sequence('"Test"', 'Xx'); pg_get_serial_sequence PUBLIC."Test_Xx_seq" (1 row) test=> SELECT pg_get_serial_sequence('"Test"', 'xx'); ERROR: column "xx" of relation "Test" does not exist Strangely, this was reported before, but not until November of 2006: http://archives.postgresql.org/pgsql-general/2006-11/msg0.php We have it in the queue to review for 8.3. Hopefully there will a change or documentation addition for this in 8.3. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [BUGS] BUG #2889: Syntax error: WHERE ANY(arrayfield) = N
David Higgs wrote: > On 1/13/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > "David" <[EMAIL PROTECTED]> writes: > > > This statement works: > > > => SELECT * FROM sal_emp WHERE 1 = ANY (pay_by_quarter); > > > > > But this does not: > > > => SELECT * FROM sal_emp WHERE ANY (pay_by_quarter) = 1; > > > ERROR: syntax error at or near "ANY" at character ... > > > > This is not a bug, it's the way the syntax works per SQL spec. > > ANY must immediately follow the operator it relates to. See > > syntax in the spec. > > > > regards, tom lane > > > > Aha, I see it in the docs now, although it's still rather unintuitive. > Could the appropriate section on arrays be crosslinked to the ANY/ALL > page, to preempt this question in the future? I researched this and found this line right above the example you quoted above: An alternative method is described in Section 9.17. The above query could be replaced by: SELECT * FROM sal_emp WHERE 1 = ANY (pay_by_quarter); and section 9.17 is 9.17. Row and Array Comparisons. Not sure we can do any better than that. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [BUGS] PostgreSQL & Slackware
Devrim GUNDUZ <[EMAIL PROTECTED]> writes: > On Fri, 2007-01-19 at 04:18 -0800, Milton C=C3=A9sar de Souza Leite wrote: >> configure: error: C preprocessor "/lib/cpp" fails sanity check > AFAIR, you need to install gcc-g++ package for Slackware to get rid of > this error. The failure appears to indicate that is not present, which certainly suggests that the C development environment is several bricks shy of a load :-(. But I'm not sure whether the gcc package or something else is missing. On Fedora 5 it looks like glibc-headers and/or glibc-kernheaders would be the responsible packages. regards, tom lane ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate
Re: [BUGS] BUG #2907: pg_get_serial_sequence quoting
Bruce Momjian <[EMAIL PROTECTED]> writes: > Adriaan van Os wrote: >> In order to work with capitals (etc.), the table_name parameter of >> pg_get_serial_sequence needs double quotes inside single quotes, the >> column_name parameter requires a name within single quotes only. > I can confirm this is still a problem in current CVS: This is not a bug, only a documentation issue. regards, tom lane ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings