Search Results

Search found 1505 results on 61 pages for 'postgresql 9 0'.

Page 26/61 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • How To Run Postgres locally

    - by Rohit Rayudu
    I read the Postgres docs for Flask and they said that to run Postgres you should have the following code app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = postgresql://localhost/[YOUR_DB_NAME]' db = SQLAlchemy(app) How do I know my database name? I wrote db as the name - but I got an error sqlalchemy.exc.OperationalError: (OperationalError) FATAL: database "[db]" does not exist Running Heroku with Flask if that helps

    Read the article

  • psql: FATAL: Ident authentication failed for user "postgres"

    - by morpheous
    I have installed PostgreSQL and pgAdminIII on my Ubuntu Karmic box. I am able to use pgAdminIII successfully (i.e. connect/log on), however when I try to login to the server using the same username/pwd on the command line (using psql), I get the error: psql: FATAL: Ident authentication failed for user "postgres" Does anyone now how to resolve this issue?

    Read the article

  • What is the best DBMS for the job?

    - by Evernoob
    Just had a discussion at work about the merits of using PostgreSQL over MySQL and vice-versa. Does anyone have any practical experience where there is a valid reason to use one over the other? Some people were saying that Postgre is better for security purposes whereas MySQL is becoming more feature rich... I'm not sure what to make of it.

    Read the article

  • SQL for sorting boolean column as true, null, false

    - by petehern
    My table has three boolean fields: f1, f2, f3. If I do SELECT * FROM table ORDER BY f1, f2, f3 the records will be sorted by these fields in the order false, true, null. I wish to order them with null in between true and false: the correct order should be true, null, false. I am using PostgreSQL.

    Read the article

  • Strategies for "Always-Connected" Windows Client Data Architecture

    - by magz2010
    Hi. Let me start by saying: this is my 1st post here, this is a bit lenghty, and I havent done Windows Forms development in years....with that in mind please excuse me if this isn't directly a programming question and please bear with me as I really need the help!! I have been asked to develop a Windows Forms app for our company that talks to a central (local area network) Linux Server hosting a PostgreSQL database. The app is to allow users to authenticate themselves into the system and thereafter conduct the usual transactions with the PG database. Ordinarily, I would propose writing a webforms app against Mono, but the clients need to utilise local resources such as USB peripheral devices, so that is out of the question. While it might not seem clear, my questions are italised below: Dilemma #1: The application is meant to be always connected. How should I structure my DAL/BLL - Should this reside on the server or with the client? Dilemma #2: I have been reading up on Client Application Services (CAS), and it seems like a great fit for authentication, as everything is exposed via URIs. I know that a .NET Data Provider exists for PostgreSQL, but not too sure if CAS will all work on a Linux (Debian) server? Believe me, I would get my hands dirty and try myself, but I need to come up with a logical design first before resources are allocated to me for "trial purposes"! Dilemma #3: If the DAL/BLL is to reside on the server, is there any way I can create data services, and expose only these services to authenticated clients. There is a (security) requirement whereby a connection string with username and password to the database cannot be present on any client machines...even if security on the database side is quite rigid. I'm guessing that the only way for this to work would be to create the various CRUD data service methods that are exposed by an ASP.NET app, and have the WindowsForms make a request for data or persist data to the ASP.NET app (thru a URI) and have that return a resultset or value. Would I be correct in assuming this? Should I be looking into WCF Data Services? and will WCF work with a non-SQL Server database? Thank you for taking the time out to read this, but know that I am desperately seeking any advice on this! THANKS A MILLION!!!!

    Read the article

  • Resort (reorder) table data

    - by Dave Jarvis
    What is the fastest way to reorder (resort) a table? In MySQL, you can do: CREATE TABLE table2 LIKE table1; INSERT INTO table2 SELECT * FROM table1 ORDER BY by name; DROP TABLE table1; RENAME TABLE table2 TO table1; What about PostgreSQL? Is there a faster way?

    Read the article

  • SQL: covert backup file from copy format to insert format

    - by takeshin
    I have a PostgreSQL backup made with PHPPgadmin using Export Copy (instead Copy SQL which is actually what I need). File contains entries like this: COPY tablename(id, field) FROM stdin; ... How to convert this file to SQL format? INSERT INTO tablename... I want to use Pgadmin to to import this file using execute SQL command.

    Read the article

  • ByPassing Google App Engine SDK to allow black listed classes

    - by ivanceras
    Is there a way to circumbent google app engine sdk to allow the usage of classes that are not present in the GAE JRE white list? I know the app that I would be building will not run in appspot, but at least in my development server, I need to access a postgresql database(java.net.socket.*) and generate some files(java.io.FileWriter) in my development server.

    Read the article

  • sql generate unique table/view name

    - by Claudiu
    I want to create some mad robust code. I want to take a query as a string, create a temporary view / table to store the results, use it, then drop the table. I want to use a name that is guaranteed to not already exist in the database. Is there an SQL command to generate a unique table name? I'm using postgresql if this is implementation-specific.

    Read the article

  • Hibernate Native Query problem with named parameters

    - by dime
    I have a problem with Hibernate Native Query. I have one SELECT that selects array slice (PostgreSQL database). The problem is that hibernate recognizes the following part: ":300" from "SELECT my_array[1:300]..." as named parameter and I get the following exception: Not all named parameters have been set. I tried to escape the colon (:) with '\:' , '::' but with no success. The Hibernate version is 3.2

    Read the article

  • Database model for storing expressions and their occurrence in text

    - by lisak
    Hey, I'm doing a statistical research application. I need to store words according to 2 initial letters which is 676 combinations and each word has its number of occurrences (minimal, maximal, average) in text. I'm not sure how the model/schema should look like. There will be a lot of checking whether the keyword was already persisted. I appreciate your suggestions. Edit: I'll be using either mysql or postgresql + spring templates

    Read the article

  • How to translate this query:

    - by xRobot
    How can I translate this 2 queries in postgresql ? : . CREATE TABLE example ( id int(10) unsigned NOT NULL auto_increment, from varchar(255) NOT NULL default '0', message text NOT NULL, lastactivity timestamp NULL default '0000-00-00 00:00:00', read int(10) unsigned NOT NULL, PRIMARY KEY (id), KEY from (from) ) DEFAULT CHARSET=utf8; . SELECT * FROM table_1 LEFT OUTER JOIN table_2 ON ( table_1.id = table_2.id ) WHERE (table_1.lastactivity > NOW()-100);

    Read the article

  • Converting an int to an IP address

    - by User1
    Is there an easy way to convert an int to an IP address in PostgreSQL? I was able to go from IP to int using this code: SELECT inet '1.2.3.4'-'0.0.0.0' This doesn't work: SELECT 16909060::inet I didn't see anything in the documentation. Does anyone know how to do this?

    Read the article

  • Is "campaign_$" a bad name for a SQL column?

    - by Summer
    PostgreSQL has allowed me to name a column "campaign_$". I like the name because it's short and to the point, and other potential names like "campaign_receipts" seem longer and less clear. BUT, I wonder if I'll eventually regret putting a $ symbol in a column name, either in PHP or in some other distant part of the architecture. Should I just stick to letters and underscores? Thanks!

    Read the article

  • How to realize this in Transact SQL ( SQL Server 2008 )

    - by David
    I just want an update trigger like this postgresql version... It seems to me there is no NEW. and OLD. in MSSQL? CREATE OR REPLACE FUNCTION "public"."ts_create" () RETURNS trigger AS DECLARE BEGIN NEW.ctime := now(); RETURN NEW; END; Googled already, but nothing to be found unfortunately... Ideas?

    Read the article

  • Running query from scratch with something like exec function?

    - by Steel Plume
    Hi, is it possible to make something similar to the following with Postgresql without using a function? pseudo sql code: select * from sometable where somecol = somevalue AND someothercol IN exec( 'select something from exclusionlist' ) My primary intention is to build up a table with predefined queries to call inside a where clause pseudo sql code: select * from sometable where somecol = somevalue AND someothercol IN exec( select query from predefinedqueries where id=someid )

    Read the article

  • Windows based Apache/PHP/Perl/database stacks

    - by GreenMatt
    Does anyone know if XAMPP's Perl also provides Tk support? Does anyone know of a similar stack which provides PostresSQL in addition to/instead of MySQL? I'd like this to run on Win 7 and XP. Edit: I do know I could install the other components I want "by hand", for example getting Tk from CPAN, I'd just prefer to get everything at one time if possible.

    Read the article

  • Apache Won't Restart After Compiling PHP with Postgres

    - by gonzofish
    I've compiled PHP (v5.3.1) with Postgres using the following configure: ./configure \ --build=x86_64-redhat-linux-gnu \ --host=x86_64-redhat-linux-gnu \ --target=x86_64-redhat-linux-gnu \ --program-prefix= \ --prefix=/usr/ \ --exec-prefix=/usr/ \ --bindir=/usr/bin/ \ --sbindir=/usr/sbin/ \ --sysconfdir=/etc \ --datadir=/usr/share \ --includedir=/usr/include/ \ --libdir=/usr/lib64 \ --libexecdir=/usr/libexec \ --localstatedir=/var \ --sharedstatedir=/usr/com \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --cache-file=../config.cache \ --with-libdir=lib64 \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ --with-pic \ --disable-rpath \ --with-pear \ --with-pic \ --with-bz2 \ --with-exec-dir=/usr/bin \ --with-freetype-dir=/usr \ --with-png-dir=/usr \ --with-xpm-dir=/usr \ --enable-gd-native-ttf \ --with-t1lib=/usr \ --without-gdbm \ --with-gettext \ --without-gmp \ --with-iconv \ --with-jpeg-dir=/usr \ --with-openssl \ --with-zlib \ --with-layout=GNU \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \ --enable-sockets \ --enable-sysvsem \ --enable-sysvshm \ --enable-sysvmsg \ --with-kerberos \ --enable-ucd-snmp-hack \ --enable-shmop \ --enable-calendar \ --with-libxml-dir=/usr \ --enable-xml \ --with-system-tzdata \ --with-mime-magic=/usr/share/file/magic \ --with-apxs2=/usr/sbin/apxs \ --with-mysql=/usr/include/mysql \ --without-gd \ --with-dom=/usr/include/libxml2/libxml \ --disable-dba \ --without-unixODBC \ --disable-pdo \ --enable-xmlreader \ --enable-xmlwriter \ --without-sqlite \ --without-sqlite3 \ --disable-phar \ --enable-fileinfo \ --enable-json \ --without-pspell \ --disable-wddx \ --with-curl=/usr/include/curl \ --enable-posix \ --with-mcrypt \ --enable-mbstring \ --with-pgsql=/mnt/mv/pgsql I'm using Postgres 8.4.0 and Apache 2.2.8; I have the following line in my Apache conf file: LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so And when I attempt to restart Apache, I get the following error message: Starting httpd: httpd: Syntax error on line 205 of /etc/httpd/conf/httpd.conf: Cannot load /usr/lib64/httpd/modules/libphp5.so into server: /usr/lib64/httpd/modules/libphp5.so: undefined symbol: lo_import_with_oid Now, I know that this is a problem with Postgres with PHP because lo_import_with_oid is a function in the Postgres source which allows the importing of large objects; also, if I remove the --with-pgsql option, PHP and Apache get along great. I've scoured the Internet looking for answers all day, but to no avail. Does anyone have ANY insight into what is causing my problems.

    Read the article

  • scalability with nginx, passenger, ruby on rails setup

    - by Dani Cela
    Hey guys I had a question regarding scalability for my RoR application. We have been optimizing our application over the last few days and after running blitz.io, notice that our application times out after maybe 1000 hits in 30 seconds we experienced massive timeouts. In the 1 minute test apparently 74% of users would have timed out. Look at the performance of my website: http://blitz.io/report/1c8eb2f395a5eadeabd62fd831ada9e5 Not saying that our website will in any way experience this now, but I wish to design the infrastructure to handle this. What is normally done in this situation? Currently we have one web server and one database server. Would load balancing be the route to go?

    Read the article

  • Error with postgres and Rails in Bundle Install on Ubuntu 12.10

    - by jason328
    I'm trying to install postgres onto Ubuntu. When running the Bundle Install in terminal I'm receiving this message at the end of the running code. How do I get pg to install properly? Libpq-dev is installed as well. Using coffee-rails (3.2.2) Using diff-lcs (1.1.3) Using jquery-rails (2.0.2) Installing pg (0.12.2) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb checking for pg_config... yes Using config values from /usr/bin/pg_config checking for libpq-fe.h... yes checking for libpq/libpq-fs.h... yes checking for PQconnectdb() in -lpq... yes checking for PQconnectionUsedPassword()... yes checking for PQisthreadsafe()... yes checking for PQprepare()... yes checking for PQexecParams()... yes checking for PQescapeString()... yes checking for PQescapeStringConn()... yes checking for PQgetCancel()... yes checking for lo_create()... yes checking for pg_encoding_to_char()... yes checking for PQsetClientEncoding()... yes checking for rb_encdb_alias()... yes checking for rb_enc_alias()... no checking for struct pgNotify.extra in libpq-fe.h... yes checking for unistd.h... yes checking for ruby/st.h... yes creating extconf.h creating Makefile make compiling compat.c compiling pg.c pg.c: In function ‘pgconn_wait_for_notify’: pg.c:2117:3: warning: ‘rb_thread_select’ is deprecated (declared at /usr/include/ruby- 1.9.1/ruby/intern.h:379) [-Wdeprecated-declarations] pg.c: In function ‘pgconn_block’: pg.c:2592:3: error: format not a string literal and no format arguments [-Werror=format- security] pg.c:2598:3: warning: ‘rb_thread_select’ is deprecated (declared at /usr/include/ruby- 1.9.1/ruby/intern.h:379) [-Wdeprecated-declarations] pg.c:2607:4: error: format not a string literal and no format arguments [-Werror=format- security] pg.c: In function ‘pgconn_locreate’: pg.c:2866:11: warning: variable ‘lo_oid’ set but not used [-Wunused-but-set-variable] pg.c: In function ‘find_or_create_johab’: pg.c:3947:3: warning: implicit declaration of function ‘rb_encdb_alias’ [-Wimplicit- function-declaration] cc1: some warnings being treated as errors make: *** [pg.o] Error 1 Gem files will remain installed in /home/jason/.bundler/tmp/10083/gems/pg-0.12.2 for inspection. Results logged to /home/jason/.bundler/tmp/10083/gems/pg-0.12.2/ext/gem_make.out An error occurred while installing pg (0.12.2), and Bundler cannot continue. Make sure that `gem install pg -v '0.12.2'` succeeds before bundling.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >